Top Fields Constructors Methods
org.aspectj.weaver.reflect

public Class ReflectionBasedReferenceTypeDelegate

extends Object
implements ReferenceTypeDelegate
Class Inheritance
All Implemented Interfaces
org.aspectj.weaver.ReferenceTypeDelegate
Known Direct Subclasses
org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate
Imports
java.lang.reflect.Constructor, .Field, .Member, .Method, java.net.URL, .URLClassLoader, java.util.Collection, .Collections, org.aspectj.weaver.AjAttribute.WeaverVersionInfo, .AnnotationAJ, .AnnotationTargetKind, .ConcreteTypeMunger, .ISourceContext, .ReferenceType, .ReferenceTypeDelegate, .ResolvedMember, .ResolvedType, .SourceContextImpl, .TypeVariable, .UnresolvedType, .WeakClassLoaderReference, .WeaverStateInfo, .World, org.aspectj.weaver.patterns.Declare, .PerClause

Author
colyer A delegate for a resolved type that uses runtime type information (java.lang.reflect) to answer questions. This class uses only Java 1.4 features to answer questions. In a Java 1.5 environment use the Java5ReflectionBasedReferenceTypeDelegate subtype.

Field Summary

Modifier and TypeField and Description
private static final ClassLoader
protected WeakClassLoaderReference
private ResolvedMember[]
private ResolvedType[]
private ResolvedMember[]
protected Class<T>
private ReferenceType
protected World

Constructor Summary

AccessConstructor and Description
public
ReflectionBasedReferenceTypeDelegate(Class<T> forClass, ClassLoader aClassLoader, World inWorld, ReferenceType resolvedType)

public
ReflectionBasedReferenceTypeDelegate()

for reflective construction only

Method Summary

Modifier and TypeMethod and Description
public ReferenceType
public boolean
public boolean
public ReflectionBasedResolvedMemberImpl
public boolean
public void
ensureConsistent()

Implements org.aspectj.weaver.ReferenceTypeDelegate.ensureConsistent.

Implementations need to clear state
public AnnotationAJ[]
public AnnotationTargetKind[]
public ResolvedType[]
protected Class<T>
public Class<?>
public int
getCompilerVersion()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getCompilerVersion.

If known, return the compiler/weaver version used to build this delegate.
public ResolvedMember[]
public String
public ResolvedType[]
public ResolvedMember[]
public ResolvedMember[]
public Collection<Declare>
public int
public ResolvedType
public PerClause
public Collection<E>
public ReferenceType
public String
public ISourceContext
public String
public ResolvedType
public Collection<ConcreteTypeMunger>
public TypeVariable[]
public WeaverStateInfo
protected World
public boolean
public boolean
public boolean
public void
initialize(ReferenceType aType, Class<?> aClass, ClassLoader aClassLoader, World aWorld)

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isCacheable()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isCacheable.

TODO Caching of methods besides getDeclaredInterfaces() may also be dependent on this flag - which?
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bootClassLoaderback to summary
private static final ClassLoader bootClassLoader
classLoaderReferenceback to summary
protected WeakClassLoaderReference classLoaderReference
fieldsback to summary
private ResolvedMember[] fields
interfacesback to summary
private ResolvedType[] interfaces
methodsback to summary
private ResolvedMember[] methods
myClassback to summary
protected Class<T> myClass
resolvedTypeback to summary
private ReferenceType resolvedType
worldback to summary
protected World world

Constructor Detail

ReflectionBasedReferenceTypeDelegateback to summary
public ReflectionBasedReferenceTypeDelegate(Class<T> forClass, ClassLoader aClassLoader, World inWorld, ReferenceType resolvedType)
ReflectionBasedReferenceTypeDelegateback to summary
public ReflectionBasedReferenceTypeDelegate()

for reflective construction only

Method Detail

buildGenericTypeback to summary
public ReferenceType buildGenericType()
canAnnotationTargetTypeback to summary
public boolean canAnnotationTargetType()

Implements org.aspectj.weaver.ReferenceTypeDelegate.canAnnotationTargetType.

Returns:boolean

Doc from org.aspectj.weaver.ReferenceTypeDelegate.canAnnotationTargetType.

true if this annotation type can be on a regular type (ie. it doesn't specify anything or it specifies TYPE)

copySourceContextback to summary
public boolean copySourceContext()

Implements org.aspectj.weaver.ReferenceTypeDelegate.copySourceContext.

createResolvedMemberForback to summary
public ReflectionBasedResolvedMemberImpl createResolvedMemberFor(Member aMember)
doesNotExposeShadowMungersback to summary
public boolean doesNotExposeShadowMungers()

Implements org.aspectj.weaver.ReferenceTypeDelegate.doesNotExposeShadowMungers.

ensureConsistentback to summary
public void ensureConsistent()

Implements org.aspectj.weaver.ReferenceTypeDelegate.ensureConsistent.

Doc from org.aspectj.weaver.ReferenceTypeDelegate.ensureConsistent.

Implementations need to clear state

getAnnotationsback to summary
public AnnotationAJ[] getAnnotations()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getAnnotations.

getAnnotationTargetKindsback to summary
public AnnotationTargetKind[] getAnnotationTargetKinds()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getAnnotationTargetKinds.

Returns:AnnotationTargetKind[]

Doc from org.aspectj.weaver.ReferenceTypeDelegate.getAnnotationTargetKinds.

all the possible targets that this annotation can be placed upon

getAnnotationTypesback to summary
public ResolvedType[] getAnnotationTypes()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getAnnotationTypes.

getBaseClassback to summary
protected Class<T> getBaseClass()
getClazzback to summary
public Class<?> getClazz()
getCompilerVersionback to summary
public int getCompilerVersion()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getCompilerVersion.

Doc from org.aspectj.weaver.ReferenceTypeDelegate.getCompilerVersion.

If known, return the compiler/weaver version used to build this delegate. Default is the most recent level as specified in WeaverVersionInfo.

Returns:int

the major version

getDeclaredFieldsback to summary
public ResolvedMember[] getDeclaredFields()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredFields.

getDeclaredGenericSignatureback to summary
public String getDeclaredGenericSignature()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredGenericSignature.

getDeclaredInterfacesback to summary
public ResolvedType[] getDeclaredInterfaces()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredInterfaces.

getDeclaredMethodsback to summary
public ResolvedMember[] getDeclaredMethods()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredMethods.

getDeclaredPointcutsback to summary
public ResolvedMember[] getDeclaredPointcuts()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclaredPointcuts.

getDeclaresback to summary
public Collection<Declare> getDeclares()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getDeclares.

getModifiersback to summary
public int getModifiers()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getModifiers.

getOuterClassback to summary
public ResolvedType getOuterClass()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getOuterClass.

getPerClauseback to summary
public PerClause getPerClause()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getPerClause.

Returns:PerClause

Doc from org.aspectj.weaver.ReferenceTypeDelegate.getPerClause.

for an aspect declaration, return the

getPrivilegedAccessesback to summary
public Collection<E> getPrivilegedAccesses()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getPrivilegedAccesses.

getResolvedTypeXback to summary
public ReferenceType getResolvedTypeX()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getResolvedTypeX.

getRetentionPolicyback to summary
public String getRetentionPolicy()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getRetentionPolicy.

getSourceContextback to summary
public ISourceContext getSourceContext()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getSourceContext.

getSourcefilenameback to summary
public String getSourcefilename()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getSourcefilename.

getSuperclassback to summary
public ResolvedType getSuperclass()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getSuperclass.

getTypeMungersback to summary
public Collection<ConcreteTypeMunger> getTypeMungers()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getTypeMungers.

getTypeVariablesback to summary
public TypeVariable[] getTypeVariables()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getTypeVariables.

getWeaverStateback to summary
public WeaverStateInfo getWeaverState()

Implements org.aspectj.weaver.ReferenceTypeDelegate.getWeaverState.

getWorldback to summary
protected World getWorld()
hasAnnotationback to summary
public boolean hasAnnotation(UnresolvedType ofType)

Implements org.aspectj.weaver.ReferenceTypeDelegate.hasAnnotation.

hasAnnotationsback to summary
public boolean hasAnnotations()

Implements org.aspectj.weaver.ReferenceTypeDelegate.hasAnnotations.

hasBeenWovenback to summary
public boolean hasBeenWoven()

Implements org.aspectj.weaver.ReferenceTypeDelegate.hasBeenWoven.

initializeback to summary
public void initialize(ReferenceType aType, Class<?> aClass, ClassLoader aClassLoader, World aWorld)
isAnnotationback to summary
public boolean isAnnotation()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAnnotation.

isAnnotationStyleAspectback to summary
public boolean isAnnotationStyleAspect()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAnnotationStyleAspect.

Returns:boolean

Doc from org.aspectj.weaver.ReferenceTypeDelegate.isAnnotationStyleAspect.

true if the type is an annotation style aspect (a type marked @Aspect)

isAnnotationWithRuntimeRetentionback to summary
public boolean isAnnotationWithRuntimeRetention()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAnnotationWithRuntimeRetention.

Returns:boolean

Doc from org.aspectj.weaver.ReferenceTypeDelegate.isAnnotationWithRuntimeRetention.

true if this annotation type has a retention policy of RUNTIME

isAnonymousback to summary
public boolean isAnonymous()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAnonymous.

isAspectback to summary
public boolean isAspect()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isAspect.

isCacheableback to summary
public boolean isCacheable()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isCacheable.

Doc from org.aspectj.weaver.ReferenceTypeDelegate.isCacheable.

TODO Caching of methods besides getDeclaredInterfaces() may also be dependent on this flag - which?

Returns:boolean

true if something the result of getDeclaredInterfaces() can be cached by the caller

isClassback to summary
public boolean isClass()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isClass.

isEnumback to summary
public boolean isEnum()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isEnum.

isExposedToWeaverback to summary
public boolean isExposedToWeaver()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isExposedToWeaver.

isGenericback to summary
public boolean isGeneric()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isGeneric.

isInterfaceback to summary
public boolean isInterface()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isInterface.

isNestedback to summary
public boolean isNested()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isNested.

Returns:boolean

Doc from org.aspectj.weaver.ReferenceTypeDelegate.isNested.

true if this class is nested (this includes: member classes, local classes, anonymous classes)

isWeavableback to summary
public boolean isWeavable()

Implements org.aspectj.weaver.ReferenceTypeDelegate.isWeavable.