API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. ClassLoader View Source
Author(s)
Since
1.0
Version
1.189, 11/17/05
Serial
Hierarchy
 Object
      ClassLoader
Implements
Subclasses
Description
publicabstract abstract class ClassLoader
  A class loader is an object that is responsible for loading classes.
Constructors
protected ClassLoader ()
  Creates a new class loader using the ClassLoader returned by the method getSystemClassLoader() as the parent class loader.
protected ClassLoader (ClassLoader parent)
  Creates a new class loader using the specified parent class loader for delegation.
Methods
Hide/Show inherited methods
pack-private void addClass (Class c)
publicsynchronized void clearAssertionStatus ()
  Sets the default assertion status for this class loader to false and discards any package defaults or class assertion status settings associated with the class loader.
@Deprecated
protectedfinal Class<Object> defineClass (byte[] b, int off, int len) throws ClassFormatError
  Converts an array of bytes into an instance of class Class.
protectedfinal Class<Object> defineClass (String name, byte[] b, int off, int len) throws ClassFormatError
  Converts an array of bytes into an instance of class Class.
protectedfinal Class<Object> defineClass (String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError
  Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain.
protectedfinal Class<Object> defineClass (String name, ByteBuffer b, ProtectionDomain protectionDomain) throws ClassFormatError
  Converts a ByteBuffer into an instance of class Class, with an optional ProtectionDomain.
protected Package definePackage (String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) throws IllegalArgumentException
  Defines a package by name in this ClassLoader.
pack-privatesynchronized boolean desiredAssertionStatus (String className)
  Returns the assertion status that would be assigned to the specified class if it were to be initialized at the time this method is invoked.
protected Class<Object> findClass (String name) throws ClassNotFoundException
  Finds the class with the specified binary name.
protected String findLibrary (String libname)
  Returns the absolute path name of a native library.
protectedfinal Class<Object> findLoadedClass (String name)
  Returns the class with the given binary name if this loader has been recorded by the Java virtual machine as an initiating loader of a class with that binary name.
pack-privatestatic long findNative (ClassLoader loader, String name)
protected URL findResource (String name)
  Finds the resource with the given name.
protected Enumeration<URL> findResources (String name) throws IOException
  Returns an enumeration of URL objects representing all the resources with the given name.
protectedfinal Class<Object> findSystemClass (String name) throws ClassNotFoundException
  Finds a class with the specified binary name, loading it if necessary.
pack-privatestatic sun.misc.URLClassPath getBootstrapClassPath ()
pack-privatestatic ClassLoader getCallerClassLoader ()
protected Package getPackage (String name)
  Returns a Package that has been defined by this class loader or any of its ancestors.
protected Package getPackages ()
  Returns all of the Packages defined by this class loader and its ancestors.
publicfinal ClassLoader getParent ()
  Returns the parent class loader for delegation.
public URL getResource (String name)
  Finds the resource with the given name.
public InputStream getResourceAsStream (String name)
  Returns an input stream for reading the specified resource.
public Enumeration<URL> getResources (String name) throws IOException
  Finds all the resources with the given name.
publicstatic ClassLoader getSystemClassLoader ()
  Returns the system class loader for delegation.
publicstatic URL getSystemResource (String name)
  Find a resource of the specified name from the search path used to load classes.
publicstatic InputStream getSystemResourceAsStream (String name)
  Open for reading, a resource of the specified name from the search path used to load classes.
publicstatic Enumeration<URL> getSystemResources (String name) throws IOException
  Finds all resources of the specified name from the search path used to load classes.
pack-private boolean isAncestor (ClassLoader cl)
public Class<Object> loadClass (String name) throws ClassNotFoundException
  Loads the class with the specified binary name.
protectedsynchronized Class<Object> loadClass (String name, boolean resolve) throws ClassNotFoundException
  Loads the class with the specified binary name.
pack-privatestatic void loadLibrary (Class fromClass, String name, boolean isAbsolute)
protectedfinal void resolveClass (Class<Object> c)
  Links the specified class.
publicsynchronized void setClassAssertionStatus (String className, boolean enabled)
  Sets the desired assertion status for the named top-level class in this class loader and any nested classes contained therein.
publicsynchronized void setDefaultAssertionStatus (boolean enabled)
  Sets the default assertion status for this class loader.
publicsynchronized void setPackageAssertionStatus (String packageName, boolean enabled)
  Sets the package default assertion status for the named package.
protectedfinal void setSigners (Class<Object> c, Object signers)
  Sets the signers of a class.
Fields
Hide/Show inherited fields
pack-private Map classAssertionStatus
pack-private Certificate nocerts
Nested Classes
  ClassLoader.NativeLibrary
The inner class NativeLibrary denotes a loaded native library instance.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar