com.mtp.pounder
Class DynamicClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--com.mtp.pounder.DynamicClassLoader
Direct Known Subclasses:
DynamicClassLoaderTest.CheckedDynamicClassLoader

public class DynamicClassLoader
extends ClassLoader

Dynamically loads classes using classpath environment variables.

Author:
Matthew Pekar

Field Summary
protected  HashSet filteredPackages
           
protected  Collection paths
           
 
Constructor Summary
DynamicClassLoader()
           
DynamicClassLoader(ClassLoader parent)
           
 
Method Summary
protected  void addDefaultFilteredPackages()
           
protected  boolean filtered(String name)
           
protected  Class findClass(String name)
           
protected  void getPaths(String path)
           
protected  void init()
           
protected  Class loadClass(String name, boolean resolve)
          Overridden so that findClass() is called before findLoadedClass() and loadClass().
protected  Class loadClassFromFile(String name, File f)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, 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

paths

protected Collection paths

filteredPackages

protected HashSet filteredPackages
Constructor Detail

DynamicClassLoader

public DynamicClassLoader()

DynamicClassLoader

public DynamicClassLoader(ClassLoader parent)
Method Detail

init

protected void init()

addDefaultFilteredPackages

protected void addDefaultFilteredPackages()

getPaths

protected void getPaths(String path)

filtered

protected boolean filtered(String name)

loadClass

protected Class loadClass(String name,
                          boolean resolve)
                   throws ClassNotFoundException
Overridden so that findClass() is called before findLoadedClass() and loadClass().

Overrides:
loadClass in class ClassLoader
ClassNotFoundException

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Overrides:
findClass in class ClassLoader
ClassNotFoundException

loadClassFromFile

protected Class loadClassFromFile(String name,
                                  File f)


Copyright © 2002 Matthew Pekar. All Rights Reserved.