API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.net. URLClassLoader View Source
Author(s)
David Connelly
Since
1.2
Version
1.91, 04/06/07
Serial
Hierarchy
 Object
      ClassLoader
          SecureClassLoader
              URLClassLoader
Implements
Subclasses
Description
public class URLClassLoader
  This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
See also:   
Constructors
public URLClassLoader (URL urls)
  Constructs a new URLClassLoader for the specified URLs using the default delegation parent ClassLoader.
public URLClassLoader (URL urls, ClassLoader parent)
  Constructs a new URLClassLoader for the given URLs.
public URLClassLoader (URL urls, ClassLoader parent, URLStreamHandlerFactory factory)
  Constructs a new URLClassLoader for the specified URLs, parent class loader, and URLStreamHandlerFactory.
Methods
Hide/Show inherited methods
protected void addURL (URL url)
  Appends the specified URL to the list of URLs to search for classes and resources.
publicsynchronized void clearAssertionStatus () [Inherited From ClassLoader]
  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 [Inherited From ClassLoader]
  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 [Inherited From ClassLoader]
  Converts an array of bytes into an instance of class Class.
protectedfinal Class<Object> defineClass (String name, byte[] b, int off, int len, CodeSource cs) [Inherited From SecureClassLoader]
  Converts an array of bytes into an instance of class Class, with an optional CodeSource.
protectedfinal Class<Object> defineClass (String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError [Inherited From ClassLoader]
  Converts an array of bytes into an instance of class Class, with an optional ProtectionDomain.
protectedfinal Class<Object> defineClass (String name, ByteBuffer b, CodeSource cs) [Inherited From SecureClassLoader]
  Converts a ByteBuffer into an instance of class Class, with an optional CodeSource.
protectedfinal Class<Object> defineClass (String name, ByteBuffer b, ProtectionDomain protectionDomain) throws ClassFormatError [Inherited From ClassLoader]
  Converts a ByteBuffer into an instance of class Class, with an optional ProtectionDomain.
protected Package definePackage (String name, Manifest man, URL url) throws IllegalArgumentException
  Defines a new package by name in this ClassLoader.
protected Package definePackage (String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) throws IllegalArgumentException [Inherited From ClassLoader]
  Defines a package by name in this ClassLoader.
protected Class<Object> findClass (String name) throws ClassNotFoundException [Overrides ClassLoader]
  Finds and loads the class with the specified name from the URL search path.
protected String findLibrary (String libname) [Inherited From ClassLoader]
  Returns the absolute path name of a native library.
protectedfinal Class<Object> findLoadedClass (String name) [Inherited From ClassLoader]
  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.
public URL findResource (String name) [Overrides ClassLoader]
  Finds the resource with the specified name on the URL search path.
public Enumeration<URL> findResources (String name) throws IOException [Overrides ClassLoader]
  Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.
protectedfinal Class<Object> findSystemClass (String name) throws ClassNotFoundException [Inherited From ClassLoader]
  Finds a class with the specified binary name, loading it if necessary.
protected Package getPackage (String name) [Inherited From ClassLoader]
  Returns a Package that has been defined by this class loader or any of its ancestors.
protected Package getPackages () [Inherited From ClassLoader]
  Returns all of the Packages defined by this class loader and its ancestors.
publicfinal ClassLoader getParent () [Inherited From ClassLoader]
  Returns the parent class loader for delegation.
protected PermissionCollection getPermissions (CodeSource codesource) [Overrides SecureClassLoader]
  Returns the permissions for the given codesource object.
public URL getResource (String name) [Inherited From ClassLoader]
  Finds the resource with the given name.
public InputStream getResourceAsStream (String name) [Inherited From ClassLoader]
  Returns an input stream for reading the specified resource.
public Enumeration<URL> getResources (String name) throws IOException [Inherited From ClassLoader]
  Finds all the resources with the given name.
publicstatic ClassLoader getSystemClassLoader () [Inherited From ClassLoader]
  Returns the system class loader for delegation.
publicstatic URL getSystemResource (String name) [Inherited From ClassLoader]
  Find a resource of the specified name from the search path used to load classes.
publicstatic InputStream getSystemResourceAsStream (String name) [Inherited From ClassLoader]
  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 [Inherited From ClassLoader]
  Finds all resources of the specified name from the search path used to load classes.
public URL getURLs ()
  Returns the search path of URLs for loading classes and resources.
public Class<Object> loadClass (String name) throws ClassNotFoundException [Inherited From ClassLoader]
  Loads the class with the specified binary name.
protectedsynchronized Class<Object> loadClass (String name, boolean resolve) throws ClassNotFoundException [Inherited From ClassLoader]
  Loads the class with the specified binary name.
publicstatic URLClassLoader newInstance (URL urls)
  Creates a new instance of URLClassLoader for the specified URLs and default parent class loader.
publicstatic URLClassLoader newInstance (URL urls, ClassLoader parent)
  Creates a new instance of URLClassLoader for the specified URLs and parent class loader.
protectedfinal void resolveClass (Class<Object> c) [Inherited From ClassLoader]
  Links the specified class.
publicsynchronized void setClassAssertionStatus (String className, boolean enabled) [Inherited From ClassLoader]
  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) [Inherited From ClassLoader]
  Sets the default assertion status for this class loader.
publicsynchronized void setPackageAssertionStatus (String packageName, boolean enabled) [Inherited From ClassLoader]
  Sets the package default assertion status for the named package.
protectedfinal void setSigners (Class<Object> c, Object signers) [Inherited From ClassLoader]
  Sets the signers of a class.
Fields
Hide/Show inherited fields
pack-private sun.misc.URLClassPath ucp
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar