Package org.aspectj.apache.bcel.util
Class SyntheticRepository
java.lang.Object
org.aspectj.apache.bcel.util.SyntheticRepository
- All Implemented Interfaces:
Repository
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().
It is designed to be used as a singleton, however it can also be used with custom classpaths. /** Abstract definition of a class repository. Instances may be used to load classes from different sources and may be used in the Repository.setRepository method.
It is designed to be used as a singleton, however it can also be used with custom classpaths. /** Abstract definition of a class repository. Instances may be used to load classes from different sources and may be used in the Repository.setRepository method.
- Version:
- $Id: SyntheticRepository.java,v 1.8 2009/09/09 19:56:20 aclement Exp $
- Author:
- M. Dahm, David Dixon-Peugh
- See Also:
Repository
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all entries from cache.Find an already defined (cached) JavaClass object by name.static SyntheticRepositorystatic SyntheticRepositorygetInstance(ClassPath classPath)Try to find class source via getResourceAsStream().Load a JavaClass object for the given class name using the CLASSPATH environment variable.voidremoveClass(JavaClass clazz)Remove class from repositoryvoidstoreClass(JavaClass clazz)Store a new JavaClass instance into this Repository.
-
Method Details
-
getInstance
-
getInstance
-
storeClass
Store a new JavaClass instance into this Repository.- Specified by:
storeClassin interfaceRepository
-
removeClass
Remove class from repository- Specified by:
removeClassin interfaceRepository
-
findClass
Find an already defined (cached) JavaClass object by name.- Specified by:
findClassin interfaceRepository
-
loadClass
Load a JavaClass object for the given class name using the CLASSPATH environment variable.- Specified by:
loadClassin interfaceRepository- Throws:
ClassNotFoundException
-
loadClass
Try to find class source via getResourceAsStream().- Specified by:
loadClassin interfaceRepository- Returns:
- JavaClass object for given runtime class
- Throws:
ClassNotFoundException- See Also:
Class
-
clear
public void clear()Clear all entries from cache.- Specified by:
clearin interfaceRepository
-