org.apache.axis2.deployment
Class DeploymentClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.apache.axis2.deployment.DeploymentClassLoader
- All Implemented Interfaces:
- BeanInfoCachingClassLoader
public class DeploymentClassLoader
- extends java.net.URLClassLoader
- implements BeanInfoCachingClassLoader
|
Constructor Summary |
DeploymentClassLoader(java.net.URL[] urls,
java.util.List embedded_jars,
java.lang.ClassLoader parent,
boolean isChildFirstClassLoading)
DeploymentClassLoader is extended from URLClassLoader. |
|
Method Summary |
protected java.lang.Class |
findClass(java.lang.String name)
Finds and loads the class with the specified name from the URL search
path. |
java.net.URL |
findResource(java.lang.String resource)
Finds the resource with the specified name on the URL search path. |
java.util.Enumeration |
findResources(java.lang.String resource)
Returns an Enumeration of URLs representing all of the resources
on the URL search path having the specified name. |
BeanInfoCache |
getBeanInfoCache()
Get the BeanInfo cache for this class loader. |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
|
boolean |
isChildFirstClassLoading()
|
protected java.lang.Class<?> |
loadClass(java.lang.String name,
boolean resolve)
|
void |
setChildFirstClassLoading(boolean childFirstClassLoading)
|
| Methods inherited from class java.net.URLClassLoader |
addURL, definePackage, 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, 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 |
DeploymentClassLoader
public DeploymentClassLoader(java.net.URL[] urls,
java.util.List embedded_jars,
java.lang.ClassLoader parent,
boolean isChildFirstClassLoading)
- DeploymentClassLoader is extended from URLClassLoader. The constructor
does not override the super constructor, but takes in an addition list of
jar files inside /lib directory.
- Parameters:
urls - URLsparent - parent classloader ClassLoader
findClass
protected java.lang.Class findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
- Finds and loads the class with the specified name from the URL search
path. Any URLs referring to JAR files are loaded and opened as needed
until the class is found.
- Overrides:
findClass in class java.net.URLClassLoader
- Parameters:
name - the name of the class
- Returns:
- the resulting class
- Throws:
java.lang.ClassNotFoundException - if the class could not be found
findResource
public java.net.URL findResource(java.lang.String resource)
- Finds the resource with the specified name on the URL search path.
- Overrides:
findResource in class java.net.URLClassLoader
- Parameters:
resource - the name of the resource
- Returns:
- a
URL for the resource, or null
if the resource could not be found.
findResources
public java.util.Enumeration findResources(java.lang.String resource)
throws java.io.IOException
- Returns an Enumeration of URLs representing all of the resources
on the URL search path having the specified name.
- Overrides:
findResources in class java.net.URLClassLoader
- Parameters:
resource - the resource name
- Returns:
- an
Enumeration of URLs
- Throws:
java.io.IOException - if an I/O exception occurs
getResourceAsStream
public java.io.InputStream getResourceAsStream(java.lang.String name)
- Overrides:
getResourceAsStream in class java.lang.ClassLoader
loadClass
protected java.lang.Class<?> loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
- Overrides:
loadClass in class java.lang.ClassLoader
- Throws:
java.lang.ClassNotFoundException
isChildFirstClassLoading
public boolean isChildFirstClassLoading()
setChildFirstClassLoading
public void setChildFirstClassLoading(boolean childFirstClassLoading)
getBeanInfoCache
public final BeanInfoCache getBeanInfoCache()
- Description copied from interface:
BeanInfoCachingClassLoader
- Get the
BeanInfo cache for this class loader.
- Specified by:
getBeanInfoCache in interface BeanInfoCachingClassLoader
- Returns:
- the cache instance; must not be
null
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.