org.eclipse.actf.validation.core
Class ExternalClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.eclipse.actf.validation.core.ExternalClassLoader

public class ExternalClassLoader
extends URLClassLoader

a configurable class loader. In particular, this loader can be configured dynamically so as to use different classpaths during the execution of a Java application.

Author:
Barry Feigenbaum

Field Summary
protected static String[] saType
           
 
Constructor Summary
ExternalClassLoader(String paths)
           
ExternalClassLoader(String[] paths)
           
ExternalClassLoader(String[] paths, ClassLoader parent)
           
ExternalClassLoader(String[] paths, ClassLoader parent, URLStreamHandlerFactory factory)
           
ExternalClassLoader(String paths, ClassLoader parent)
           
ExternalClassLoader(String paths, ClassLoader parent, URLStreamHandlerFactory factory)
           
ExternalClassLoader(URL[] urls)
           
ExternalClassLoader(URL[] urls, ClassLoader parent)
           
ExternalClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory)
           
 
Method Summary
 void addPath(String path)
           
 void addPaths(String[] paths)
           
 void addURL(URL url)
           
protected  Class findClass(String name)
           
 String[] getPaths()
           
 List getPathsAsList()
           
 List getURLsAsList()
           
protected  Class loadClass(String name, boolean resolve)
           
protected static URL[] pathsToUrls(String paths)
           
protected static URL[] pathsToUrls(String[] paths)
           
protected static URL pathToUrl(String path)
           
 
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, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

saType

protected static final String[] saType
Constructor Detail

ExternalClassLoader

public ExternalClassLoader(URL[] urls)
Parameters:
urls -

ExternalClassLoader

public ExternalClassLoader(URL[] urls,
                           ClassLoader parent)
Parameters:
urls -
parent -

ExternalClassLoader

public ExternalClassLoader(URL[] urls,
                           ClassLoader parent,
                           URLStreamHandlerFactory factory)
Parameters:
urls -
parent -
factory -

ExternalClassLoader

public ExternalClassLoader(String paths)
                    throws MalformedURLException
Parameters:
paths -
Throws:
MalformedURLException

ExternalClassLoader

public ExternalClassLoader(String paths,
                           ClassLoader parent)
                    throws MalformedURLException
Parameters:
paths -
parent -
Throws:
MalformedURLException

ExternalClassLoader

public ExternalClassLoader(String paths,
                           ClassLoader parent,
                           URLStreamHandlerFactory factory)
                    throws MalformedURLException
Parameters:
paths -
parent -
factory -
Throws:
MalformedURLException

ExternalClassLoader

public ExternalClassLoader(String[] paths)
                    throws MalformedURLException
Parameters:
paths -
Throws:
MalformedURLException

ExternalClassLoader

public ExternalClassLoader(String[] paths,
                           ClassLoader parent)
                    throws MalformedURLException
Parameters:
paths -
parent -
Throws:
MalformedURLException

ExternalClassLoader

public ExternalClassLoader(String[] paths,
                           ClassLoader parent,
                           URLStreamHandlerFactory factory)
                    throws MalformedURLException
Parameters:
paths -
parent -
factory -
Throws:
MalformedURLException
Method Detail

addURL

public void addURL(URL url)
Overrides:
addURL in class URLClassLoader

addPath

public void addPath(String path)
             throws MalformedURLException
Throws:
MalformedURLException

addPaths

public void addPaths(String[] paths)
              throws MalformedURLException
Throws:
MalformedURLException

getPaths

public String[] getPaths()

getPathsAsList

public List getPathsAsList()

getURLsAsList

public List getURLsAsList()

pathsToUrls

protected static URL[] pathsToUrls(String paths)
                            throws MalformedURLException
Throws:
MalformedURLException

pathsToUrls

protected static URL[] pathsToUrls(String[] paths)
                            throws MalformedURLException
Throws:
MalformedURLException

pathToUrl

protected static URL pathToUrl(String path)
                        throws MalformedURLException
Throws:
MalformedURLException

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Overrides:
findClass in class URLClassLoader
Throws:
ClassNotFoundException

loadClass

protected Class loadClass(String name,
                          boolean resolve)
                   throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException