Package org.apache.bcel.util
Class ClassLoaderRepository
- java.lang.Object
-
- org.apache.bcel.util.ClassLoaderRepository
-
- All Implemented Interfaces:
java.io.Serializable,Repository
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 $
- Author:
- M. Dahm, David Dixon-Peugh
- See Also:
Repository, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassLoaderRepository(java.lang.ClassLoader loader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear all entries from cache.JavaClassfindClass(java.lang.String className)Find an already defined JavaClass.ClassPathgetClassPath()Get the ClassPath associated with this RepositoryJavaClassloadClass(java.lang.Class clazz)Find the JavaClass instance for the given run-time class objectJavaClassloadClass(java.lang.String className)Lookup a JavaClass object from the Class Name provided.voidremoveClass(JavaClass clazz)Remove class from repositoryvoidstoreClass(JavaClass clazz)Store a new JavaClass into this Repository.
-
-
-
Method Detail
-
storeClass
public void storeClass(JavaClass clazz)
Store a new JavaClass into this Repository.- Specified by:
storeClassin interfaceRepository
-
removeClass
public void removeClass(JavaClass clazz)
Remove class from repository- Specified by:
removeClassin interfaceRepository
-
findClass
public JavaClass findClass(java.lang.String className)
Find an already defined JavaClass.- Specified by:
findClassin interfaceRepository
-
loadClass
public JavaClass loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
Lookup a JavaClass object from the Class Name provided.- Specified by:
loadClassin interfaceRepository- Throws:
java.lang.ClassNotFoundException
-
loadClass
public JavaClass loadClass(java.lang.Class clazz) throws java.lang.ClassNotFoundException
Description copied from interface:RepositoryFind the JavaClass instance for the given run-time class object- Specified by:
loadClassin interfaceRepository- Throws:
java.lang.ClassNotFoundException
-
clear
public void clear()
Clear all entries from cache.- Specified by:
clearin interfaceRepository
-
getClassPath
public ClassPath getClassPath()
Description copied from interface:RepositoryGet the ClassPath associated with this Repository- Specified by:
getClassPathin interfaceRepository
-
-