java.net
Class FactoryURLClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--java.security.SecureClassLoader
              |
              +--java.net.URLClassLoader
                    |
                    +--java.net.FactoryURLClassLoader

final class FactoryURLClassLoader
extends URLClassLoader


Field Summary
 
Fields inherited from class java.net.URLClassLoader
 
Fields inherited from class java.security.SecureClassLoader
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
(package private) FactoryURLClassLoader(URL[] urls)
           
(package private) FactoryURLClassLoader(URL[] urls, ClassLoader parent)
           
 
Method Summary
 Class loadClass(String name, boolean resolve)
          Loads the class with the specified name.
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryURLClassLoader

FactoryURLClassLoader(URL[] urls,
                      ClassLoader parent)

FactoryURLClassLoader

FactoryURLClassLoader(URL[] urls)
Method Detail

loadClass

public final Class loadClass(String name,
                             boolean resolve)
                      throws ClassNotFoundException
Description copied from class: ClassLoader
Loads the class with the specified name. The default implementation of this method searches for classes in the following order:

  1. Call ClassLoader.findLoadedClass(String) to check if the class has already been loaded.

  2. Call the loadClass method on the parent class loader. If the parent is null the class loader built-in to the virtual machine is used, instead.

  3. Call the ClassLoader.findClass(String) method to find the class.

If the class was found using the above steps, and the resolve flag is true, this method will then call the ClassLoader.resolveClass(Class) method on the resulting class object.

From the Java 2 SDK, v1.2, subclasses of ClassLoader are encouraged to override ClassLoader.findClass(String), rather than this method.

Overrides:
loadClass in class ClassLoader
Parameters:
name - the name of the class
resolve - if true then resolve the class
Returns:
the resulting Class object
ClassNotFoundException


comments?