com.ph.pr.apps.jaspcleaner
Class JCClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by com.ph.pr.apps.jaspcleaner.JCClassLoader

 class JCClassLoader
extends java.lang.ClassLoader

For use by JaspCleaner in loading classes that are import ed into the JSP page. For more information, see findClass(String).

Author:
"Greg Golberg", Phil Schwarz

Field Summary
private  java.util.Set imports
          Imported packages.
private  java.util.Map loaded
          Map of class name to Class objects for those already loaded.
 
Constructor Summary
JCClassLoader(java.lang.Object o)
          Constructor.
 
Method Summary
 void addImport(java.lang.String pkg)
          Add the package to the list of packages where the lookup will proceed.
protected  java.lang.Class findClass(java.lang.String className)
          A ClassLoader.findClass(java.lang.String), such that: If a qualified name is passed, it is passed to the ClassLoader.findClass(java.lang.String).
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, 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
 

Field Detail

imports

private final java.util.Set imports
Imported packages.


loaded

private final java.util.Map loaded
Map of class name to Class objects for those already loaded.

Constructor Detail

JCClassLoader

public JCClassLoader(java.lang.Object o)
Constructor. During construction, the following packages are explicitly addImport(String)ed:

Parameters:
o - Object whose ClassLoader is to be used as parent.
Method Detail

addImport

public void addImport(java.lang.String pkg)
Add the package to the list of packages where the lookup will proceed.

Parameters:
pkg - Package identifier to add.

findClass

protected java.lang.Class findClass(java.lang.String className)
                             throws java.lang.ClassNotFoundException
A ClassLoader.findClass(java.lang.String), such that:

Overrides:
findClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException
See Also:
ClassLoader.findClass(java.lang.String)