Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.bcel.util
Class ClassLoaderRepository  view ClassLoaderRepository download ClassLoaderRepository.java

java.lang.Object
  extended byorg.apache.bcel.util.ClassLoaderRepository
All Implemented Interfaces:
Repository, java.io.Serializable

public class ClassLoaderRepository
extends java.lang.Object
implements Repository

The repository maintains information about which classes have been loaded. It loads its data from the ClassLoader implementation passed into its constructor.

Version:
$Id: ClassLoaderRepository.java 386056 2006-03-15 11:31:56Z tcurdt $

Field Summary
private  java.util.Map loadedClasses
           
private  java.lang.ClassLoader loader
           
 
Constructor Summary
ClassLoaderRepository(java.lang.ClassLoader loader)
           
 
Method Summary
 void clear()
          Clear all entries from cache.
 org.apache.bcel.classfile.JavaClass findClass(java.lang.String className)
          Find an already defined JavaClass.
 ClassPath getClassPath()
          Get the ClassPath associated with this Repository
 org.apache.bcel.classfile.JavaClass loadClass(java.lang.Class clazz)
          Find the JavaClass instance for the given run-time class object
 org.apache.bcel.classfile.JavaClass loadClass(java.lang.String className)
          Lookup a JavaClass object from the Class Name provided.
 void removeClass(org.apache.bcel.classfile.JavaClass clazz)
          Remove class from repository
 void storeClass(org.apache.bcel.classfile.JavaClass clazz)
          Store a new JavaClass into this Repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loader

private java.lang.ClassLoader loader

loadedClasses

private java.util.Map loadedClasses
Constructor Detail

ClassLoaderRepository

public ClassLoaderRepository(java.lang.ClassLoader loader)
Method Detail

storeClass

public void storeClass(org.apache.bcel.classfile.JavaClass clazz)
Store a new JavaClass into this Repository.

Specified by:
storeClass in interface Repository

removeClass

public void removeClass(org.apache.bcel.classfile.JavaClass clazz)
Remove class from repository

Specified by:
removeClass in interface Repository

findClass

public org.apache.bcel.classfile.JavaClass findClass(java.lang.String className)
Find an already defined JavaClass.

Specified by:
findClass in interface Repository

loadClass

public org.apache.bcel.classfile.JavaClass loadClass(java.lang.String className)
                                              throws java.lang.ClassNotFoundException
Lookup a JavaClass object from the Class Name provided.

Specified by:
loadClass in interface Repository

loadClass

public org.apache.bcel.classfile.JavaClass loadClass(java.lang.Class clazz)
                                              throws java.lang.ClassNotFoundException
Description copied from interface: Repository
Find the JavaClass instance for the given run-time class object

Specified by:
loadClass in interface Repository

clear

public void clear()
Clear all entries from cache.

Specified by:
clear in interface Repository

getClassPath

public ClassPath getClassPath()
Description copied from interface: Repository
Get the ClassPath associated with this Repository

Specified by:
getClassPath in interface Repository