public class ClassPathRepository extends Object
Repository
Constructor and Description |
---|
ClassPathRepository(ClassPath classPath) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all entries from cache.
|
JavaClass |
findClass(String className)
Finds an already defined (cached) JavaClass object by name.
|
ClassPath |
getClassPath()
Gets the ClassPath associated with this Repository
|
JavaClass |
loadClass(Class<?> clazz)
Finds the JavaClass object for a runtime Class object.
|
JavaClass |
loadClass(String className)
Finds a JavaClass object by name.
|
void |
removeClass(JavaClass javaClass)
Removes class from repository.
|
void |
storeClass(JavaClass javaClass)
Stores a new JavaClass instance into this Repository.
|
public ClassPathRepository(ClassPath classPath)
public void storeClass(JavaClass javaClass)
storeClass
in interface Repository
public void removeClass(JavaClass javaClass)
removeClass
in interface Repository
public JavaClass findClass(String className)
findClass
in interface Repository
public void clear()
clear
in interface Repository
public JavaClass loadClass(String className) throws ClassNotFoundException
loadClass
in interface Repository
className
- the name of the classClassNotFoundException
- if the class is not in the Repository, and could not be found on the classpathpublic JavaClass loadClass(Class<?> clazz) throws ClassNotFoundException
loadClass
in interface Repository
clazz
- the runtime Class objectClassNotFoundException
- if the class is not in the Repository, and its representation could not be foundClass
public ClassPath getClassPath()
Repository
getClassPath
in interface Repository
Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.