Top Description Fields Constructors Methods
org.aspectj.apache.bcel

public abstract Class Repository

extends Object
Class Inheritance
Imports
java.io.IOException, org.aspectj.apache.bcel.classfile.JavaClass, org.aspectj.apache.bcel.util.ClassPath, .SyntheticRepository

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.
Author
M. Dahm
Version
$Id: Repository.java,v 1.6 2009/09/09 22:18:20 aclement Exp $
See Also
org.aspectj.apache.bcel.util.Repository, org.aspectj.apache.bcel.util.SyntheticRepository

Field Summary

Modifier and TypeField and Description
private static Repository

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static JavaClass

Returns:

old entry in repository
addClass
(JavaClass clazz)

Add clazz to repository if there isn't an equally named class already in there.

public static void
clearCache()

Clear the repository.

public static Repository

Returns:

currently used repository instance
getRepository
()

public static boolean

Returns:

true, if clazz is an implementation of interface inter
implementationOf
(JavaClass clazz, JavaClass inter)

public static boolean

Returns:

true, if clazz is an implementation of interface inter
implementationOf
(String clazz, String inter)

public static boolean

Returns:

true, if clazz is an instance of super_class
instanceOf
(JavaClass clazz, JavaClass super_class)

Equivalent to runtime "instanceof" operator.

public static boolean

Returns:

true, if clazz is an instance of super_class
instanceOf
(String clazz, String super_class)

public static JavaClass

Returns:

class object for given fully qualified class name, or null if the class could not be found or parsed correctly
lookupClass
(String class_name)

Lookup class somewhere found on your CLASSPATH, or whereever the repository instance looks for it.

public static ClassPath.ClassFile

Returns:

class file object for given Java class.
lookupClassFile
(String class_name)

public static void
removeClass(String clazz)

Remove class with given (fully qualified) name from repository.

public static void
setRepository(Repository rep)

Set repository instance to be used for class loading

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_repositoryback to summary
private static Repository _repository

Constructor Detail

Repositoryback to summary
public Repository()

Method Detail

addClassback to summary
public static JavaClass addClass(JavaClass clazz)

Add clazz to repository if there isn't an equally named class already in there.

Returns:JavaClass

old entry in repository

clearCacheback to summary
public static void clearCache()

Clear the repository.

getRepositoryback to summary
public static Repository getRepository()
Returns:Repository

currently used repository instance

implementationOfback to summary
public static boolean implementationOf(JavaClass clazz, JavaClass inter)
Returns:boolean

true, if clazz is an implementation of interface inter

implementationOfback to summary
public static boolean implementationOf(String clazz, String inter)
Returns:boolean

true, if clazz is an implementation of interface inter

instanceOfback to summary
public static boolean instanceOf(JavaClass clazz, JavaClass super_class)

Equivalent to runtime "instanceof" operator.

Returns:boolean

true, if clazz is an instance of super_class

instanceOfback to summary
public static boolean instanceOf(String clazz, String super_class)
Returns:boolean

true, if clazz is an instance of super_class

lookupClassback to summary
public static JavaClass lookupClass(String class_name)

Lookup class somewhere found on your CLASSPATH, or whereever the repository instance looks for it.

Returns:JavaClass

class object for given fully qualified class name, or null if the class could not be found or parsed correctly

lookupClassFileback to summary
public static ClassPath.ClassFile lookupClassFile(String class_name)
Returns:ClassPath.ClassFile

class file object for given Java class.

removeClassback to summary
public static void removeClass(String clazz)

Remove class with given (fully qualified) name from repository.

setRepositoryback to summary
public static void setRepository(Repository rep)

Set repository instance to be used for class loading