Save This Page
Home » openjdk-7 » java » lang » [javadoc | source]
java.lang
final class: VMClassLoader [javadoc | source]
java.lang.Object
   java.lang.VMClassLoader
java.lang.VMClassLoader is a package-private helper for VMs to implement on behalf of java.lang.ClassLoader.
Field Summary
static final  HashMap definedPackages    packages loaded by the bootstrap class loader 
static final  HashMap bootjars    jars from property java.boot.class.path 
static final  Instrumentation instrumenter    The Instrumentation object created by the vm when agents are defined. 
Method from java.lang.VMClassLoader Summary:
classAssertionStatus,   defaultAssertionStatus,   defineClass,   defineClassWithTransformers,   findLoadedClass,   getPackage,   getPackages,   getPrimitiveClass,   getResource,   getResources,   getSystemClassLoader,   loadClass,   packageAssertionStatus,   resolveClass
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.lang.VMClassLoader Detail:
 static final Map classAssertionStatus() 
    The system default for class assertion status. This is used for all ClassLoader's classAssertionStatus defaults. It must be a map of class names to Boolean.TRUE or Boolean.FALSE XXX - Not implemented yet; this requires native help.
 static final boolean defaultAssertionStatus() 
    The system default for assertion status. This is used for all system classes (those with a null ClassLoader), as well as the initial value for every ClassLoader's default assertion status. XXX - Not implemented yet; this requires native help.
 static final native Class defineClass(ClassLoader cl,
    String name,
    byte[] data,
    int offset,
    int len,
    ProtectionDomain pd) throws ClassFormatError
    Helper to define a class using a string of bytes. This assumes that the security checks have already been performed, if necessary. Implementations of this method are advised to consider the situation where user code modifies the byte array after it has been passed to defineClass. This can be handled by making a private copy of the array, or arranging to only read any given byte a single time.
 static final Class defineClassWithTransformers(ClassLoader loader,
    String name,
    byte[] data,
    int offset,
    int len,
    ProtectionDomain pd) 
    Call the transformers of the possible Instrumentation object. This implementation assumes the instrumenter is a InstrumentationImpl object. VM implementors would have to redefine this method if they provide their own implementation of the Instrumentation interface.
 static native Class findLoadedClass(ClassLoader cl,
    String name)
    Find the class if this class loader previously defined this class or if this class loader has been recorded as the initiating class loader for this class.
 static Package getPackage(String name) 
    Helper to get a package from the bootstrap class loader.
 static Package[] getPackages() 
    Helper to get all packages from the bootstrap class loader.
 static final native Class getPrimitiveClass(char type)
    Helper for java.lang.Integer, Byte, etc to get the TYPE class at initialization time. The type code is one of the chars that represents the primitive type as in JNI.
    • 'Z' - boolean
    • 'B' - byte
    • 'C' - char
    • 'D' - double
    • 'F' - float
    • 'I' - int
    • 'J' - long
    • 'S' - short
    • 'V' - void
 static URL getResource(String name) 
    Helper to load a resource from the bootstrap class loader.
 static Enumeration getResources(String name) 
    Helper to get a list of resources from the bootstrap class loader.
 static ClassLoader getSystemClassLoader() 
 static final native Class loadClass(String name,
    boolean resolve) throws ClassNotFoundException
    Helper to load a class from the bootstrap class loader.
 static final Map packageAssertionStatus() 
    The system default for package assertion status. This is used for all ClassLoader's packageAssertionStatus defaults. It must be a map of package names to Boolean.TRUE or Boolean.FALSE, with the unnamed package represented as a null key. XXX - Not implemented yet; this requires native help.
 static final native  void resolveClass(Class c)
    Helper to resolve all references to other classes from this class.