org.apache.cocoon.components.classloader
Class DefaultClassLoaderFactory.DefaultClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.apache.cocoon.components.classloader.DefaultClassLoaderFactory.DefaultClassLoader
- Enclosing class:
- DefaultClassLoaderFactory
- public static class DefaultClassLoaderFactory.DefaultClassLoader
- extends URLClassLoader
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, 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 |
DefaultClassLoaderFactory.DefaultClassLoader
public DefaultClassLoaderFactory.DefaultClassLoader(URL[] urls,
int[][] includes,
int[][] excludes,
ClassLoader parent)
- Alternate constructor to define a parent and initial
URL
s.
DefaultClassLoaderFactory.DefaultClassLoader
public DefaultClassLoaderFactory.DefaultClassLoader(URL[] urls,
int[][] includes,
int[][] excludes,
ClassLoader parent,
URLStreamHandlerFactory factory)
- Alternate constructor to define a parent, initial
URL
s,
and a default URLStreamHandlerFactory
.
loadClass
public final Class loadClass(String name,
boolean resolve)
throws ClassNotFoundException
- Loads the class from this
ClassLoader. If the
class does not exist in this one, we check the parent. Please
note that this is the exact opposite of the
ClassLoader
spec. We use it to work around
inconsistent class loaders from third party vendors.
- Parameters:
name
- the name of the classresolve
- if true
then resolve the class
- Returns:
- the resulting
Class
object
- Throws:
ClassNotFoundException
- if the class could not be found
getResource
public final URL getResource(String name)
- Gets a resource from this
ClassLoader. If the
resource does not exist in this one, we check the parent.
Please note that this is the exact opposite of the
ClassLoader
spec. We use it to work around
inconsistent class loaders from third party vendors.
- Parameters:
name
- of resource
Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.