To resolve an unresolved symbolic reference from D to a class or interface C denoted by N, the following steps are performed:
-
The defining loader of D is used to load and thereby create a class or interface denoted by
N. This class or interface is C. The details of the process are given in §5.3.Any exception that can be thrown as a result of failure to load and thereby create C can thus be thrown as a result of failure of class and interface resolution.
-
If C is an array class and its element type is a
referencetype, then a symbolic reference to the class or interface representing the element type is resolved by invoking the algorithm in §5.4.3.1 recursively. -
Finally, access control is applied for the access from D to C (§5.4.4).
If steps 1 and 2 succeed but step 3 fails, C is still valid and usable. Nevertheless, resolution fails, and D is prohibited from accessing C.