A Class represents a Java type. There will never be multiple Class objects with identical names and ClassLoaders. Primitive types, array types, and void also have a Class object.
Arrays with identical type and number of dimensions share the same class. The array class ClassLoader is the same as the ClassLoader of the element type of the array (which can be null to indicate the bootstrap classloader). The name of an array class is [<signature format>;
.
For example, String[]'s class is [Ljava.lang.String;
. boolean, byte, short, char, int, long, float and double have the "type name" of Z,B,S,C,I,J,F,D for the purposes of array classes. If it's a multidimensioned array, the same principle applies: int[][][]
== [[[I
.
There is no public constructor - Class objects are obtained only through the virtual machine, as defined in ClassLoaders.
@serialData Class objects serialize specially:TC_CLASS ClassDescriptor
. For more serialization information, see {@link ObjectStreamClass}.
@author John Keiser
@author Eric Blake (ebb9@email.byu.edu)
@author Tom Tromey (tromey@redhat.com)
@author Andrew John Hughes (gnu_andrew@member.fsf.org)
@since 1.0
@see ClassLoader