de.sciss.util
Class DynamicURLClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by de.sciss.util.DynamicURLClassLoader

public class DynamicURLClassLoader
extends java.net.URLClassLoader

Extends java.net.URLClassLoader to be able to dynamically add URLs to the classpath. URLs can refer to a jar (ending with '.jar', they can be a classes directory (ending with '/'), they can be a single class (ending with '.class').

Version:
0.59, 25-Feb-08
Author:
Hanns Holger Rutz

Constructor Summary
DynamicURLClassLoader()
          Creates a new class loader instance with no custom folders and jars existing.
DynamicURLClassLoader(java.lang.ClassLoader parent)
          Creates a new class loader instance with no custom folders and jars existing.
DynamicURLClassLoader(java.net.URL[] urls)
          Creates a new class loader instance with a given list of custom folders and jars.
DynamicURLClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
          Creates a new class loader instance with a given list of custom folders and jars.
 
Method Summary
 void addURL(java.net.URL url)
          Made a public method
 void addURLs(java.net.URL[] urls)
           
protected  java.lang.Class findClass(java.lang.String name)
           
 
Methods inherited from class java.net.URLClassLoader
definePackage, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, 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

DynamicURLClassLoader

public DynamicURLClassLoader()
Creates a new class loader instance with no custom folders and jars existing. To add these, call addURL repeatedly.


DynamicURLClassLoader

public DynamicURLClassLoader(java.net.URL[] urls)
Creates a new class loader instance with a given list of custom folders and jars.


DynamicURLClassLoader

public DynamicURLClassLoader(java.lang.ClassLoader parent)
Creates a new class loader instance with no custom folders and jars existing. To add these, call addURL repeatedly.


DynamicURLClassLoader

public DynamicURLClassLoader(java.net.URL[] urls,
                             java.lang.ClassLoader parent)
Creates a new class loader instance with a given list of custom folders and jars.

Method Detail

addURL

public void addURL(java.net.URL url)
Made a public method

Overrides:
addURL in class java.net.URLClassLoader

addURLs

public void addURLs(java.net.URL[] urls)

findClass

protected java.lang.Class findClass(java.lang.String name)
                             throws java.lang.ClassNotFoundException
Overrides:
findClass in class java.net.URLClassLoader
Throws:
java.lang.ClassNotFoundException