org.apache.bcel
public abstract class Repository extends Object
See Also: 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(String clazz, String inter) |
static boolean | implementationOf(JavaClass clazz, String inter) |
static boolean | implementationOf(String clazz, JavaClass inter) |
static boolean | instanceOf(JavaClass clazz, JavaClass super_class)
Equivalent to runtime "instanceof" operator. |
static boolean | instanceOf(String clazz, String super_class) |
static boolean | instanceOf(JavaClass clazz, String super_class) |
static boolean | instanceOf(String clazz, JavaClass super_class) |
static JavaClass | lookupClass(String class_name) Lookup class somewhere found on your CLASSPATH, or whereever the
repository instance looks for it.
|
static JavaClass | lookupClass(Class clazz)
Try to find class source using the internal repository instance. |
static ClassPath.ClassFile | lookupClassFile(String class_name) |
static void | removeClass(String clazz)
Remove class with given (fully qualified) name from repository. |
static void | removeClass(JavaClass clazz)
Remove given class from repository. |
static void | setRepository(Repository rep) Set repository instance to be used for class loading |
Returns: old entry in repository
Returns: all interfaces implemented by class and its super classes and the interfaces that those interfaces extend, and so on. (Some people call this a transitive hull).
Throws: ClassNotFoundException if any of the class's superclasses or superinterfaces can't be found
Returns: all interfaces implemented by class and its super classes and the interfaces that extend those interfaces, and so on
Throws: ClassNotFoundException if the named class can't be found, or if any of its superclasses or superinterfaces can't be found
Returns: currently used repository instance
Returns: list of super classes of clazz in ascending order, i.e., Object is always the last element
Throws: ClassNotFoundException if any of the superclasses can't be found
Returns: list of super classes of clazz in ascending order, i.e., Object is always the last element.
Throws: ClassNotFoundException if the named class or any of its superclasses can't be found
Returns: true, if clazz is an implementation of interface inter
Throws: ClassNotFoundException if any superclasses or superinterfaces of clazz can't be found
Returns: true, if clazz is an implementation of interface inter
Throws: ClassNotFoundException if clazz, inter, or any superclasses or superinterfaces of clazz can't be found
Returns: true, if clazz is an implementation of interface inter
Throws: ClassNotFoundException if inter or any superclasses or superinterfaces of clazz can't be found
Returns: true, if clazz is an implementation of interface inter
Throws: ClassNotFoundException if clazz or any superclasses or superinterfaces of clazz can't be found
Returns: true, if clazz is an instance of super_class
Throws: ClassNotFoundException if any superclasses or superinterfaces of clazz can't be found
Returns: true, if clazz is an instance of super_class
Throws: ClassNotFoundException if either clazz or super_class can't be found
Returns: true, if clazz is an instance of super_class
Throws: ClassNotFoundException if super_class can't be found
Returns: true, if clazz is an instance of super_class
Throws: ClassNotFoundException if clazz can't be found
Returns: class object for given fully qualified class name
Throws: ClassNotFoundException if the class could not be found or parsed correctly
Returns: JavaClass object for given runtime class
Throws: ClassNotFoundException if the class could not be found or parsed correctly
See Also: Class
Returns: class file object for given Java class by looking on the system class path; returns null if the class file can't be found