Package 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:
Closeable,AutoCloseable,BeanInfoCachingClassLoader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionDeploymentClassLoader(URL[] urls, List embedded_jars, ClassLoader parent, boolean isChildFirstClassLoading) DeploymentClassLoader is extended from URLClassLoader. -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassFinds and loads the class with the specified name from the URL search path.findResource(String resource) Finds the resource with the specified name on the URL search path.findResources(String resource) Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.final BeanInfoCacheGet theBeanInfocache for this class loader.getResourceAsStream(String name) booleanprotected Class<?> voidsetChildFirstClassLoading(boolean childFirstClassLoading) Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, getPermissions, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoader
defineClass, defineClassMethods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
DeploymentClassLoader
public DeploymentClassLoader(URL[] urls, List embedded_jars, 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 classloaderClassLoader
-
-
Method Details
-
findClass
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:
findClassin classURLClassLoader- Parameters:
name- the name of the class- Returns:
- the resulting class
- Throws:
ClassNotFoundException- if the class could not be found
-
findResource
Finds the resource with the specified name on the URL search path.- Overrides:
findResourcein classURLClassLoader- Parameters:
resource- the name of the resource- Returns:
- a
URLfor the resource, ornullif the resource could not be found.
-
findResources
Returns an Enumeration of URLs representing all of the resources on the URL search path having the specified name.- Overrides:
findResourcesin classURLClassLoader- Parameters:
resource- the resource name- Returns:
- an
EnumerationofURLs - Throws:
IOException- if an I/O exception occurs
-
getResourceAsStream
- Overrides:
getResourceAsStreamin classURLClassLoader
-
loadClass
- Overrides:
loadClassin classClassLoader- Throws:
ClassNotFoundException
-
isChildFirstClassLoading
public boolean isChildFirstClassLoading() -
setChildFirstClassLoading
public void setChildFirstClassLoading(boolean childFirstClassLoading) -
getBeanInfoCache
Description copied from interface:BeanInfoCachingClassLoaderGet theBeanInfocache for this class loader.- Specified by:
getBeanInfoCachein interfaceBeanInfoCachingClassLoader- Returns:
- the cache instance; must not be
null
-