Package org.apache.axis2.tools.idea
Class PluginClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- org.apache.axis2.tools.idea.PluginClassLoader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class PluginClassLoader extends URLClassLoader
-
-
Constructor Summary
Constructors Constructor Description PluginClassLoader(URL[] urls, ClassLoader parent)
PluginClassLoader is exetend form URLClassLoader , and the constructor has not overide the super constroctor , but has done some stuff to find out jar fils inside /lib director
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class
findClass(String name)
-
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findResource, findResources, getPermissions, getResourceAsStream, 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, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
Constructor Detail
-
PluginClassLoader
public PluginClassLoader(URL[] urls, ClassLoader parent)
PluginClassLoader is exetend form URLClassLoader , and the constructor has not overide the super constroctor , but has done some stuff to find out jar fils inside /lib director- Parameters:
urls
-URL
parent
- parent classloaderClassLoader
-
-
Method Detail
-
findClass
protected Class findClass(String name) throws ClassNotFoundException
- Overrides:
findClass
in classURLClassLoader
- Parameters:
name
-String
Name of the file to be loaded- Returns:
Class
return a class object if it found else will return null or a ClassNotFoundException This method has been overridden in the following way 1. It calls the super class and checks to see whether the class is there If the class is found then return it, else if super return ClassNotfoundException 2. Check whether the entry corresponding to the class name exists in one of jar files in /lib director 3. If it is there get the byte array out of that and create a Class object out of that by calling "defineClass()" , if it succeeds then return that else 4. Throw a ClassNotFoundException- Throws:
ClassNotFoundException
-
-