org.apache.axis2.tools.idea
Class PluginClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.apache.axis2.tools.idea.PluginClassLoader

public class PluginClassLoader
extends URLClassLoader


Constructor Summary
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
protected  Class findClass(String name)
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, 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, getResourceAsStream, 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
 

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 classloader ClassLoader
Method Detail

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Overrides:
findClass in class URLClassLoader
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


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.