JavaClass objects class names via ClassPath.
Subclasses can choose caching strategy of the objects by implementing the abstract methods (e.g.,
storeClass(JavaClass) and findClass(String)).
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public abstract JavaClass | findClass(final String className)
Redeclares org. |
| public ClassPath | getClassPath()
Implements org. |
| public JavaClass | Returns: JavaClass object for given runtime classthe runtime Class object clazz)Implements org. |
| private JavaClass | |
| public JavaClass | Returns: the JavaClass objectthe name of the class className)Implements org. |
| public abstract void | removeClass(final JavaClass javaClass)
Redeclares org. |
| public abstract void | storeClass(final JavaClass javaClass)
Redeclares org. |
| classPath | back to summary |
|---|---|
| private final ClassPath classPath | |
| AbstractClassPathRepository | back to summary |
|---|---|
| pack-priv AbstractClassPathRepository(final ClassPath classPath) | |
| clear | back to summary |
|---|---|
| public abstract void clear() Redeclares org. Doc from org. Clears all entries from cache.
| |
| findClass | back to summary |
|---|---|
| public abstract JavaClass findClass(final String className) Redeclares org. Doc from org. Finds the class with the name provided, if the class isn't there, return NULL.
| |
| getClassPath | back to summary |
|---|---|
| public ClassPath getClassPath() Implements org. Doc from org. Gets the ClassPath associated with this Repository
| |
| loadClass | back to summary |
|---|---|
| public JavaClass loadClass(final Class<?> clazz) throws ClassNotFoundException Implements org. 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 org. 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 abstract void removeClass(final JavaClass javaClass) Redeclares org. Doc from org. Removes class from repository
| |
| storeClass | back to summary |
|---|---|
| public abstract void storeClass(final JavaClass javaClass) Redeclares org. Doc from org. Stores the provided class under "clazz.getClassName()"
| |