Resolves the appropriate
Class object for the stream class descriptor
classDesc
.
AnnotatedObjectInputStream
implements this method as follows:
Invokes this stream's
#readAnnotation method to read the annotation
string value (possibly null
) for the class descriptor. If
readAnnotation
throws an exception, then this method throws that exception.
Otherwise, a codebase value is chosen as follows: if the
#useCodebaseAnnotations method has been invoked on this stream, then the codebase value
chosen is the value that was returned by readAnnotation
; otherwise, the codebase
value chosen is null
.
This method then invokes
ClassLoading#loadClass with the
chosen codebase value as the first argument, the name of the class described by
classDesc
as the second argument, and the defaultLoader
,
verifyCodebaseIntegrity
, and verifierLoader
values that were passed
to this stream's constructor as the third, fourth, and fifth arguments. If
ClassLoading.loadClass
throws a ClassNotFoundException
and the name
of the class described by classDesc
equals the Java(TM) programming language
keyword for a primitive type or void
, then this method returns the
Class
corresponding to that primitive type or void
(
Integer#TYPE for int
,
Void#TYPE for void
, and so forth).
Otherwise, if ClassLoading.loadClass
throws an exception, this method throws
that exception, and if it returns normally, this method returns the Class
returned by ClassLoading.loadClass
.