Top Description Fields Constructors Methods
org.aspectj.weaver.reflect

public Class ReflectionBasedResolvedMemberImpl

extends ResolvedMemberImpl
Class Inheritance
Imports
java.lang.reflect.Member, org.aspectj.weaver.AnnotationAJ, .MemberKind, .ResolvedMember, .ResolvedMemberImpl, .ResolvedType, .UnresolvedType

Subtype of ResolvedMemberImpl used in reflection world. Knows how to get annotations from a java.lang.reflect.Member
Authors
Adrian Colyer, Andy Clement

Field Summary

Modifier and TypeField and Description
private AnnotationFinder
private GenericSignatureInformationProvider
private boolean
onlyRuntimeAnnotationsCached

If true then only runtime visible annotations have been resolved via reflection.

private Member
Inherited from org.aspectj.weaver.ResolvedMemberImpl:
annotationsannotationTypesbackingGenericMembercheckedExceptionsendparameterAnnotationsparameterAnnotationTypesshowParameterNamessourceContextstarttypeVariables

Constructor Summary

AccessConstructor and Description
public
ReflectionBasedResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, Member reflectMember)

public
ReflectionBasedResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions, Member reflectMember)

public
ReflectionBasedResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions, ResolvedMember backingGenericMember, Member reflectMember)

public
ReflectionBasedResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, String name, String signature, Member reflectMember)

Method Summary

Modifier and TypeMethod and Description
public String
public AnnotationAJ
public ResolvedType[]
public UnresolvedType[]
public UnresolvedType
public Member
public ResolvedType[][]
public boolean
hasAnnotation(UnresolvedType
the type of the annotation being searched for
ofType
)

Overrides org.aspectj.weaver.ResolvedMemberImpl.hasAnnotation.

Implements org.aspectj.weaver.ResolvedMember.hasAnnotation.

Check if this member has an annotation of the specified type.
public boolean
public boolean
public boolean
public boolean
public void
public void
private void
unpackAnnotations(boolean areRuntimeRetentionAnnotationsSufficient)

Inherited from org.aspectj.weaver.ResolvedMemberImpl:
addAnnotationappendSigWithTypeVarBoundsRemovedevictWeavingStategetAnnotationsgetAssociatedShadowMungergetBackingGenericMembergetEffectiveSignaturegetEndgetExceptionsgetExceptionsgetGenericSignaturegetJoinPointSignaturesgetModifiersgetModifiersgetParameterAnnotationsgetParameterNamesgetParameterNamesgetParameterSignatureErasedgetSignatureErasedgetSignatureForAttributegetSourceContextgetSourceContextgetSourceLocationgetStartgetTypeVariableNamedgetTypeVariableshasBackingGenericMemberisAbstractisAjSyntheticisAnnotatedElsewhereisCompatibleWithisDefaultisDefaultConstructorisEquivalentToisPublicisVisiblematchesparameterizeparameterizedWithparameterizedWithparameterizedWithreadResolvedMemberreadResolvedMemberArrayresetKindresetModifiersresetNameresetReturnTypeToObjectArrayresolvesetAjSyntheticsetAnnotatedElsewheresetAnnotationssetAnnotationTypessetCheckedExceptionssetDeclaringTypesetParameterNamessetPositionsetSourceContextsetTypeVariablessetVarargsMethodtoDebugStringtoGenericStringwritewriteArray

Field Detail

annotationFinderback to summary
private AnnotationFinder annotationFinder
gsigInfoProviderback to summary
private GenericSignatureInformationProvider gsigInfoProvider
onlyRuntimeAnnotationsCachedback to summary
private boolean onlyRuntimeAnnotationsCached

If true then only runtime visible annotations have been resolved via reflection. If class retention annotations are also required (later) then the cache will have to be rebuilt using a more detailed dig into the class file.

reflectMemberback to summary
private Member reflectMember

Constructor Detail

ReflectionBasedResolvedMemberImplback to summary
public ReflectionBasedResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, Member reflectMember)
ReflectionBasedResolvedMemberImplback to summary
public ReflectionBasedResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions, Member reflectMember)
ReflectionBasedResolvedMemberImplback to summary
public ReflectionBasedResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions, ResolvedMember backingGenericMember, Member reflectMember)
ReflectionBasedResolvedMemberImplback to summary
public ReflectionBasedResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, String name, String signature, Member reflectMember)

Method Detail

getAnnotationDefaultValueback to summary
public String getAnnotationDefaultValue()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getAnnotationDefaultValue.

Implements org.aspectj.weaver.ResolvedMember.getAnnotationDefaultValue.

Annotations
@Override
getAnnotationOfTypeback to summary
public AnnotationAJ getAnnotationOfType(UnresolvedType ofType)

Overrides org.aspectj.weaver.ResolvedMemberImpl.getAnnotationOfType.

Implements org.aspectj.weaver.AnnotatedElement.getAnnotationOfType.

Annotations
@Override
getAnnotationTypesback to summary
public ResolvedType[] getAnnotationTypes()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getAnnotationTypes.

Implements org.aspectj.weaver.ResolvedMember.getAnnotationTypes.

Annotations
@Override
getGenericParameterTypesback to summary
public UnresolvedType[] getGenericParameterTypes()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getGenericParameterTypes.

Implements org.aspectj.weaver.ResolvedMember.getGenericParameterTypes, org.aspectj.weaver.Member.getGenericParameterTypes.

Doc from org.aspectj.weaver.ResolvedMemberImpl.getGenericParameterTypes.

Get the TypeXs of the parameter types, taking generic signature into account

Annotations
@Override
getGenericReturnTypeback to summary
public UnresolvedType getGenericReturnType()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getGenericReturnType.

Implements org.aspectj.weaver.ResolvedMember.getGenericReturnType, org.aspectj.weaver.Member.getGenericReturnType.

Doc from org.aspectj.weaver.ResolvedMemberImpl.getGenericReturnType.

Get the UnresolvedType for the return type, taking generic signature into account

Annotations
@Override
getMemberback to summary
public Member getMember()
getParameterAnnotationTypesback to summary
public ResolvedType[][] getParameterAnnotationTypes()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getParameterAnnotationTypes.

Implements org.aspectj.weaver.ResolvedMember.getParameterAnnotationTypes.

Annotations
@Override
hasAnnotationback to summary
public boolean hasAnnotation(UnresolvedType ofType)

Overrides org.aspectj.weaver.ResolvedMemberImpl.hasAnnotation.

Implements org.aspectj.weaver.ResolvedMember.hasAnnotation.

Doc from org.aspectj.weaver.ResolvedMemberImpl.hasAnnotation.

Check if this member has an annotation of the specified type. If the member has a backing generic member then this member represents a parameterization of a member in a generic type and the annotations available on the backing generic member should be used.

Parameters
ofType:UnresolvedType

the type of the annotation being searched for

Returns:boolean

true if the annotation is found on this member or its backing generic member

Annotations
@Override
hasAnnotationsback to summary
public boolean hasAnnotations()

Overrides org.aspectj.weaver.ResolvedMemberImpl.hasAnnotations.

Annotations
@Override
isBridgeMethodback to summary
public boolean isBridgeMethod()

Overrides org.aspectj.weaver.ResolvedMemberImpl.isBridgeMethod.

Implements org.aspectj.weaver.ResolvedMember.isBridgeMethod.

Annotations
@Override
isSyntheticback to summary
public boolean isSynthetic()

Overrides org.aspectj.weaver.ResolvedMemberImpl.isSynthetic.

Implements org.aspectj.weaver.ResolvedMember.isSynthetic.

Annotations
@Override
isVarargsMethodback to summary
public boolean isVarargsMethod()

Overrides org.aspectj.weaver.ResolvedMemberImpl.isVarargsMethod.

Implements org.aspectj.weaver.ResolvedMember.isVarargsMethod.

Annotations
@Override
setAnnotationFinderback to summary
public void setAnnotationFinder(AnnotationFinder finder)
setGenericSignatureInformationProviderback to summary
public void setGenericSignatureInformationProvider(GenericSignatureInformationProvider gsigProvider)
unpackAnnotationsback to summary
private void unpackAnnotations(boolean areRuntimeRetentionAnnotationsSufficient)