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:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear all entries from cache.Find an already defined (cached) JavaClass object by name.static SyntheticRepository
static SyntheticRepository
getInstance
(ClassPath classPath) Try to find class source via getResourceAsStream().Load a JavaClass object for the given class name using the CLASSPATH environment variable.void
removeClass
(JavaClass clazz) Remove class from repositoryvoid
storeClass
(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:
storeClass
in interfaceRepository
-
removeClass
Remove class from repository- Specified by:
removeClass
in interfaceRepository
-
findClass
Find an already defined (cached) JavaClass object by name.- Specified by:
findClass
in interfaceRepository
-
loadClass
Load a JavaClass object for the given class name using the CLASSPATH environment variable.- Specified by:
loadClass
in interfaceRepository
- Throws:
ClassNotFoundException
-
loadClass
Try to find class source via getResourceAsStream().- Specified by:
loadClass
in interfaceRepository
- Returns:
- JavaClass object for given runtime class
- Throws:
ClassNotFoundException
- See Also:
-
clear
-