org.apache.axis2.deployment
Class DeploymentClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.apache.axis2.deployment.DeploymentClassLoader
- public class DeploymentClassLoader
- extends URLClassLoader
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, 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 |
DeploymentClassLoader
public DeploymentClassLoader(URL[] urls,
ClassLoader parent)
- DeploymentClassLoader is extended from URLClassLoader. The constructor
does not override the super constructor, but does additional steps like find out
jar fils inside /lib directory.
- Parameters:
urls
- URL
parent
- parent classloader ClassLoader
findClass
protected Class findClass(String name)
throws ClassNotFoundException
- Parameters:
name
- String
Name of the file to be loaded
- Returns:
- Returns a
Class
object if it found else
returns null or ClassNotFoundException.
The method finds the class in the following way:
1. Calls the super class to check to see whether the class is there.
If the class is found then return that , else go to step 2
2. Check wether the class name exist in one of jar files
in /lib directory. If it is found, get the byte array and create a Class
object from it by calling "defineClass()", else throws ClassNotFoundException.
- Throws:
ClassNotFoundException
getResourceAsStream
public InputStream getResourceAsStream(String name)
setParentFirst
public void setParentFirst(boolean parentFirst)