Package org.apache.bcel.util
Class ClassPathRepository
- java.lang.Object
-
- org.apache.bcel.util.AbstractClassPathRepository
-
- org.apache.bcel.util.ClassPathRepository
-
- All Implemented Interfaces:
Repository
public class ClassPathRepository extends AbstractClassPathRepository
This repository is used in situations where a Class is created outside the realm of a ClassLoader. Classes are loaded from the file systems using the paths specified in the given class path. By default, this is the value returned by ClassPath.getClassPath().- See Also:
Repository
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,JavaClass>_loadedClasses
-
Constructor Summary
Constructors Constructor Description ClassPathRepository(ClassPath classPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears all entries from cache.JavaClassfindClass(java.lang.String className)Finds an already defined (cached) JavaClass object by name.voidremoveClass(JavaClass javaClass)Removes class from repository.voidstoreClass(JavaClass javaClass)Stores a new JavaClass instance into this Repository.-
Methods inherited from class org.apache.bcel.util.AbstractClassPathRepository
getClassPath, loadClass, loadClass
-
-
-
-
Field Detail
-
_loadedClasses
private final java.util.Map<java.lang.String,JavaClass> _loadedClasses
-
-
Constructor Detail
-
ClassPathRepository
public ClassPathRepository(ClassPath classPath)
-
-
Method Detail
-
storeClass
public void storeClass(JavaClass javaClass)
Stores a new JavaClass instance into this Repository.- Specified by:
storeClassin interfaceRepository- Specified by:
storeClassin classAbstractClassPathRepository
-
removeClass
public void removeClass(JavaClass javaClass)
Removes class from repository.- Specified by:
removeClassin interfaceRepository- Specified by:
removeClassin classAbstractClassPathRepository
-
findClass
public JavaClass findClass(java.lang.String className)
Finds an already defined (cached) JavaClass object by name.- Specified by:
findClassin interfaceRepository- Specified by:
findClassin classAbstractClassPathRepository
-
clear
public void clear()
Clears all entries from cache.- Specified by:
clearin interfaceRepository- Specified by:
clearin classAbstractClassPathRepository
-
-