Interface Repository
- All Known Implementing Classes:
ClassLoaderRepository, ClassPathRepository, LruCacheClassPathRepository, MemorySensitiveClassPathRepository, SyntheticRepository
public interface Repository
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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all entries from cache.Finds the class with the name provided, if the class isn't there, return NULL.Gets the ClassPath associated with this Repository.Finds the JavaClass instance for the given run-time class object.Finds the class with the name provided, if the class isn't there, make an attempt to load it.voidremoveClass(JavaClass clazz) Removes class from repository.voidstoreClass(JavaClass clazz) Stores the provided class under "clazz.getClassName()".
-
Method Details
-
clear
void clear()Clears all entries from cache. -
findClass
-
getClassPath
Gets the ClassPath associated with this Repository.- Returns:
- the ClassPath.
-
loadClass
Finds the JavaClass instance for the given run-time class object.- Parameters:
clazz- the class.- Returns:
- the JavaClass instance.
- Throws:
ClassNotFoundException- if the class can't be found.
-
loadClass
Finds the class with the name provided, if the class isn't there, make an attempt to load it.- Parameters:
className- the class name.- Returns:
- the JavaClass instance.
- Throws:
ClassNotFoundException- if the class can't be found.
-
removeClass
Removes class from repository.- Parameters:
clazz- the class to remove.
-
storeClass
Stores the provided class under "clazz.getClassName()".- Parameters:
clazz- the class to store.
-