|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.bcel.Repository
public abstract class Repository
The repository maintains informations about class interdependencies, e.g., whether a class is a sub-class of another. Delegates actual class loading to SyntheticRepository with current class path by default.
Repository
,
SyntheticRepository
Constructor Summary | |
---|---|
Repository()
|
Method Summary | |
---|---|
static JavaClass |
addClass(JavaClass clazz)
Add clazz to repository if there isn't an equally named class already in there. |
static void |
clearCache()
Clear the repository. |
static JavaClass[] |
getInterfaces(JavaClass clazz)
|
static JavaClass[] |
getInterfaces(String class_name)
|
static Repository |
getRepository()
|
static JavaClass[] |
getSuperClasses(JavaClass clazz)
|
static JavaClass[] |
getSuperClasses(String class_name)
|
static boolean |
implementationOf(JavaClass clazz,
JavaClass inter)
|
static boolean |
implementationOf(JavaClass clazz,
String inter)
|
static boolean |
implementationOf(String clazz,
JavaClass inter)
|
static boolean |
implementationOf(String clazz,
String inter)
|
static boolean |
instanceOf(JavaClass clazz,
JavaClass super_class)
Equivalent to runtime "instanceof" operator. |
static boolean |
instanceOf(JavaClass clazz,
String super_class)
|
static boolean |
instanceOf(String clazz,
JavaClass super_class)
|
static boolean |
instanceOf(String clazz,
String super_class)
|
static JavaClass |
lookupClass(Class clazz)
Try to find class source using the internal repository instance. |
static JavaClass |
lookupClass(String class_name)
Lookup class somewhere found on your CLASSPATH, or whereever the repository instance looks for it. |
static ClassPath.ClassFile |
lookupClassFile(String class_name)
|
static void |
removeClass(JavaClass clazz)
Remove given class from repository. |
static void |
removeClass(String clazz)
Remove class with given (fully qualified) name from repository. |
static void |
setRepository(Repository rep)
Set repository instance to be used for class loading |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Repository()
Method Detail |
---|
public static Repository getRepository()
public static void setRepository(Repository rep)
public static JavaClass lookupClass(String class_name) throws ClassNotFoundException
ClassNotFoundException
- if the class could not be found or
parsed correctlypublic static JavaClass lookupClass(Class clazz) throws ClassNotFoundException
ClassNotFoundException
- if the class could not be found or
parsed correctlyClass
public static ClassPath.ClassFile lookupClassFile(String class_name)
public static void clearCache()
public static JavaClass addClass(JavaClass clazz)
public static void removeClass(String clazz)
public static void removeClass(JavaClass clazz)
public static JavaClass[] getSuperClasses(JavaClass clazz) throws ClassNotFoundException
ClassNotFoundException
- if any of the superclasses can't be foundpublic static JavaClass[] getSuperClasses(String class_name) throws ClassNotFoundException
ClassNotFoundException
- if the named class or any of its
superclasses can't be foundpublic static JavaClass[] getInterfaces(JavaClass clazz) throws ClassNotFoundException
ClassNotFoundException
- if any of the class's
superclasses or superinterfaces can't be foundpublic static JavaClass[] getInterfaces(String class_name) throws ClassNotFoundException
ClassNotFoundException
- if the named class can't be found,
or if any of its superclasses or superinterfaces can't be foundpublic static boolean instanceOf(JavaClass clazz, JavaClass super_class) throws ClassNotFoundException
ClassNotFoundException
- if any superclasses or superinterfaces
of clazz can't be foundpublic static boolean instanceOf(String clazz, String super_class) throws ClassNotFoundException
ClassNotFoundException
- if either clazz or super_class
can't be foundpublic static boolean instanceOf(JavaClass clazz, String super_class) throws ClassNotFoundException
ClassNotFoundException
- if super_class can't be foundpublic static boolean instanceOf(String clazz, JavaClass super_class) throws ClassNotFoundException
ClassNotFoundException
- if clazz can't be foundpublic static boolean implementationOf(JavaClass clazz, JavaClass inter) throws ClassNotFoundException
ClassNotFoundException
- if any superclasses or superinterfaces
of clazz can't be foundpublic static boolean implementationOf(String clazz, String inter) throws ClassNotFoundException
ClassNotFoundException
- if clazz, inter, or any superclasses
or superinterfaces of clazz can't be foundpublic static boolean implementationOf(JavaClass clazz, String inter) throws ClassNotFoundException
ClassNotFoundException
- if inter or any superclasses
or superinterfaces of clazz can't be foundpublic static boolean implementationOf(String clazz, JavaClass inter) throws ClassNotFoundException
ClassNotFoundException
- if clazz or any superclasses or
superinterfaces of clazz can't be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |