calypso.util
Class URLClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--calypso.util.URLClassLoader

public class URLClassLoader
extends java.lang.ClassLoader

A URL based class loader. This class knows how to load classes from a given base URL


Constructor Summary
URLClassLoader(java.net.URL aBaseURL, java.net.URL aArchiveURL)
          Create a new URL based class loader.
 
Method Summary
protected  void finalize()
           
protected  java.lang.Class findClass(java.lang.String name)
          This method finds a class.
 java.net.URL getCodeBaseURL()
           
 java.lang.Class loadClass(java.lang.String name)
          Load a class from this class loader.
protected  java.lang.Class loadClass(java.lang.String name, boolean resolve)
          Load and resolve a class.
 
Methods inherited from class java.lang.ClassLoader
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLClassLoader

public URLClassLoader(java.net.URL aBaseURL,
                      java.net.URL aArchiveURL)
Create a new URL based class loader. aBaseURL specifies the URL to load classes relative to. If aArchiveURL is not null then the archive will be searched first (if it fails then the load will be attempted from aBaseURL).
Method Detail

loadClass

public java.lang.Class loadClass(java.lang.String name)
                          throws java.lang.ClassNotFoundException
Load a class from this class loader. This method is used by applets that want to explicitly load a class.
Overrides:
loadClass in class java.lang.ClassLoader

loadClass

protected java.lang.Class loadClass(java.lang.String name,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException
Load and resolve a class. This method is called by the java runtime to get a class that another class needs (e.g. a superclass).
Overrides:
loadClass in class java.lang.ClassLoader

findClass

protected java.lang.Class findClass(java.lang.String name)
                             throws java.lang.ClassNotFoundException
This method finds a class. The returned class may be unresolved. This method has to be synchronized to avoid two threads loading the same class at the same time. Must be called with the actual class name.
Overrides:
findClass in class java.lang.ClassLoader

getCodeBaseURL

public java.net.URL getCodeBaseURL()

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object