This repository uses a factory design, allowing it to maintain a collection of different classpaths, and as such It is designed to be used as a singleton per classpath.
com.sun.org.apache.bcel.internal.Repository
| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements com. Clear all entries from cache. |
| public JavaClass | findClass(final String className)
Implements com. Find an already defined (cached) JavaClass object by name. |
| public static SyntheticRepository | |
| public JavaClass | Returns: JavaClass object for given runtime classthe runtime Class object clazz)Implements com. Finds the JavaClass object for a runtime Class object. |
| private JavaClass | |
| public JavaClass | Returns: the JavaClass objectthe name of the class className)Implements com. Finds a JavaClass object by name. |
| public void | removeClass(final JavaClass clazz)
Implements com. Remove class from repository |
| public void | storeClass(final JavaClass clazz)
Implements com. Store a new JavaClass instance into this Repository. |
| loadedClasses | back to summary |
|---|---|
| private final Map<String, SoftReference<JavaClass>> loadedClasses | |
| SyntheticRepository | back to summary |
|---|---|
| private SyntheticRepository() | |
| clear | back to summary |
|---|---|
| public void clear() Implements com. Clear all entries from cache.
| |
| findClass | back to summary |
|---|---|
| public JavaClass findClass(final String className) Implements com. Find an already defined (cached) JavaClass object by name.
| |
| getInstance | back to summary |
|---|---|
| public static SyntheticRepository getInstance() | |
| loadClass | back to summary |
|---|---|
| public JavaClass loadClass(final Class<?> clazz) throws ClassNotFoundException Implements com. Finds the JavaClass object for a runtime Class object. If a class with the same name is already in this Repository, the Repository version is returned. Otherwise, getResourceAsStream() is called on the Class object to find the class's representation. If the representation is found, it is added to the Repository.
| |
| loadClass | back to summary |
|---|---|
| private JavaClass loadClass(final InputStream inputStream, final String className) throws ClassNotFoundException | |
| loadClass | back to summary |
|---|---|
| public JavaClass loadClass(String className) throws ClassNotFoundException Implements com. Finds a JavaClass object by name. If it is already in this Repository, the Repository version is returned. Otherwise, the Repository's classpath is searched for the class (and it is added to the Repository if found).
| |
| removeClass | back to summary |
|---|---|
| public void removeClass(final JavaClass clazz) Implements com. Remove class from repository
| |
| storeClass | back to summary |
|---|---|
| public void storeClass(final JavaClass clazz) Implements com. Store a new JavaClass instance into this Repository.
| |