Class EclipseResolvedMember
java.lang.Object
org.aspectj.weaver.MemberImpl
org.aspectj.weaver.ResolvedMemberImpl
org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember
- All Implemented Interfaces:
Comparable<Member>, AnnotatedElement, IHasPosition, Member, ResolvedMember, TypeVariableDeclaringElement
In the pipeline world, we can be weaving before all types have come through from compilation. In some cases this means the weaver
will want to ask questions of eclipse types and this subtype of ResolvedMemberImpl is here to answer some of those questions - it
is backed by the real eclipse MethodBinding object and can translate from Eclipse → Weaver information.
-
Field Summary
Fields inherited from class ResolvedMemberImpl
annotations, annotationTypes, backingGenericMember, checkedExceptions, end, parameterAnnotations, parameterAnnotationTypes, showParameterNames, sourceContext, start, typeVariablesModifier and TypeFieldDescriptionprotected AnnotationAJ[]protected ResolvedType[]protected ResolvedMemberif this member is a parameterized version of a member in a generic type, then this field holds a reference to the member we parameterize.protected UnresolvedType[]protected intprotected AnnotationAJ[][]protected ResolvedType[][]static booleanprotected ISourceContextprotected intprotected TypeVariable[]Fields inherited from class MemberImpl
declaringType, kind, modifiers, name, parameterTypes, returnTypeModifier and TypeFieldDescriptionprotected UnresolvedTypeprotected MemberKindprotected intprotected Stringprotected UnresolvedType[]protected UnresolvedTypeFields inherited from interface Member
ADVICE, CONSTRUCTOR, FIELD, HANDLER, METHOD, MONITORENTER, MONITOREXIT, NO_PARAMETER_ANNOTATION_TYPES, NO_PARAMETER_ANNOTATIONXS, NONE, POINTCUT, STATIC_INITIALIZATIONModifier and TypeFieldDescriptionstatic final MemberKindstatic final MemberKindstatic final MemberKindstatic final MemberKindstatic final MemberKindstatic final MemberKindstatic final MemberKindstatic final ResolvedType[][]static final AnnotationAJ[][]static final Member[]static final MemberKindstatic final MemberKindFields inherited from interface ResolvedMember
NONE -
Constructor Summary
ConstructorsConstructorDescriptionEclipseResolvedMember(FieldBinding binding, MemberKind field, ResolvedType realDeclaringType, int modifiers, ResolvedType type, String string, UnresolvedType[] none) EclipseResolvedMember(MethodBinding binding, MemberKind memberKind, ResolvedType realDeclaringType, int modifiers, UnresolvedType rettype, String name, UnresolvedType[] paramtypes, UnresolvedType[] extypes, EclipseFactory eclipseFactory) -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotationOfType(UnresolvedType ofType) ResolvedType[][]String[]booleanhasAnnotation(UnresolvedType ofType) Check if this member has an annotation of the specified type.booleanReturn true if this is the default constructor.Methods inherited from class ResolvedMemberImpl
addAnnotation, appendSigWithTypeVarBoundsRemoved, evictWeavingState, getAssociatedShadowMunger, getBackingGenericMember, getEffectiveSignature, getEnd, getExceptions, getExceptions, getGenericParameterTypes, getGenericReturnType, getGenericSignature, getJoinPointSignatures, getModifiers, getModifiers, getParameterAnnotations, getParameterNames, getParameterSignatureErased, getSignatureErased, getSignatureForAttribute, getSourceContext, getSourceContext, getSourceLocation, getStart, getTypeVariableNamed, getTypeVariables, hasAnnotations, hasBackingGenericMember, isAbstract, isAjSynthetic, isAnnotatedElsewhere, isBridgeMethod, isCompatibleWith, isDefault, isEquivalentTo, isPublic, isSynthetic, isVarargsMethod, isVisible, matches, parameterize, parameterizedWith, parameterizedWith, parameterizedWith, readResolvedMember, readResolvedMemberArray, resetKind, resetModifiers, resetName, resetReturnTypeToObjectArray, resolve, setAjSynthetic, setAnnotatedElsewhere, setAnnotations, setAnnotationTypes, setCheckedExceptions, setDeclaringType, setParameterNames, setPosition, setSourceContext, setTypeVariables, setVarargsMethod, toDebugString, toGenericString, write, writeArrayModifier and TypeMethodDescriptionvoidaddAnnotation(AnnotationAJ annotation) static voidappendSigWithTypeVarBoundsRemoved(UnresolvedType aType, StringBuffer toBuffer, Set<UnresolvedType> alreadyUsedTypeVars) voidintgetEnd()The ending index of this location in the character stream This points to the last character in this token.final UnresolvedType[]getExceptions(World world) Get the TypeXs of the parameter types, taking generic signature into accountGet the UnresolvedType for the return type, taking generic signature into accountstatic JoinPointSignature[]getJoinPointSignatures(Member joinPointSignature, World inAWorld) Compute the full set of signatures for a member.final intfinal intgetModifiers(World world) AnnotationAJ[][]final String[]getParameterNames(World world) Return the erased form of the signature with bounds collapsed for type variables, etc.Return the member generic signature that would be suitable for inclusion in a class file Signature attribute.getSourceContext(World world) intgetStart()The starting index of this location in the character stream.getTypeVariableNamed(String name) booleanbooleanIf this member is defined by a parameterized super-type, return the erasure of that member.booleanbooleanbooleanbooleanbooleanbooleanbooleanisEquivalentTo(Object other) booleanisPublic()booleanbooleanbooleanisVisible(ResolvedType fromType) booleanmatches(ResolvedMember aCandidateMatch, boolean ignoreGenerics) Returns true if this member matches the other.protected UnresolvedTypeparameterize(UnresolvedType aType, Map<String, UnresolvedType> typeVariableMap, boolean inParameterizedType, World w) parameterizedWith(Map<String, UnresolvedType> m, World w) Replace occurrences of type variables in the signature with values contained in the map.parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType, boolean isParameterized) parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType, boolean isParameterized, List<String> aliases) Return a resolvedmember in which all the type variables in the signature have been replaced with the given bindings.static ResolvedMemberImplreadResolvedMember(VersionedDataInputStream s, ISourceContext sourceContext) static ResolvedMember[]voidresetKind(MemberKind newKind) voidresetModifiers(int newModifiers) voidFor ITDs, we use the default factory methods to build a resolved member, then alter a couple of characteristics using this method - this is safe.voidprotected voidsetAjSynthetic(boolean b) voidsetAnnotatedElsewhere(boolean b) voidsetAnnotations(AnnotationAJ[] annotations) voidsetAnnotationTypes(ResolvedType[] annotationTypes) voidsetCheckedExceptions(UnresolvedType[] checkedExceptions) voidfinal voidsetParameterNames(String[] pnames) voidsetPosition(int sourceStart, int sourceEnd) voidsetSourceContext(ISourceContext sourceContext) voidsetTypeVariables(TypeVariable[] tvars) voidUseful for writing tests, returns *everything* we know about this member.voidstatic voidwriteArray(ResolvedMember[] members, CompressingDataOutputStream s) Methods inherited from class MemberImpl
canBeParameterized, compareTo, equals, equalsApartFromDeclaringType, field, getArity, getDeclaringType, getDeclaringTypes, getJoinPointSignatures, getKind, getName, getParameterSignature, getParameterTypes, getReturnType, getSignature, getType, hashCode, isInterface, isPrivate, isStatic, makeExceptionHandlerSignature, method, method, monitorEnter, monitorExit, pointcut, toString, typesToSignature, typesToSignature, wipeJoinpointSignaturesModifier and TypeMethodDescriptionbooleanReturns true iff the member is generic (NOT parameterized)intfinal booleanfinal booleanstatic MemberImplintgetArity()getDeclaringTypes(World world) getJoinPointSignatures(World inAWorld) All the signatures that a join point with this member as its signature has.getKind()getName()Return signature without return type, e.g.Return full signature, including return type, e.g.final UnresolvedTypegetType()inthashCode()final booleanfinal booleanfinal booleanisStatic()static ResolvedMemberImplmakeExceptionHandlerSignature(UnresolvedType inType, UnresolvedType catchType) static MemberImplmethod(UnresolvedType declaring, int mods, String name, String signature) static MemberImplmethod(UnresolvedType declTy, int mods, UnresolvedType rTy, String name, UnresolvedType[] paramTys) static MemberImplstatic MemberImplstatic Memberpointcut(UnresolvedType declaring, String name, String signature) toString()static StringtypesToSignature(UnresolvedType[] paramTypes) Returns "(<signaturesOfParamTypes>,...)" - unlike the other typesToSignature that also includes the return type, this one just deals with the parameter types.static StringtypesToSignature(UnresolvedType returnType, UnresolvedType[] paramTypes, boolean eraseGenerics) Build a signature based on the return type and parameter types.voidMethods inherited from interface ResolvedMember
equalsApartFromDeclaringType
-
Constructor Details
-
EclipseResolvedMember
public EclipseResolvedMember(MethodBinding binding, MemberKind memberKind, ResolvedType realDeclaringType, int modifiers, UnresolvedType rettype, String name, UnresolvedType[] paramtypes, UnresolvedType[] extypes, EclipseFactory eclipseFactory) -
EclipseResolvedMember
public EclipseResolvedMember(FieldBinding binding, MemberKind field, ResolvedType realDeclaringType, int modifiers, ResolvedType type, String string, UnresolvedType[] none)
-
-
Method Details
-
hasAnnotation
Description copied from class:ResolvedMemberImplCheck 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.- Specified by:
hasAnnotationin interfaceAnnotatedElement- Specified by:
hasAnnotationin interfaceResolvedMember- Overrides:
hasAnnotationin classResolvedMemberImpl- Parameters:
ofType- the type of the annotation being searched for- Returns:
- true if the annotation is found on this member or its backing generic member
-
getAnnotations
- Specified by:
getAnnotationsin interfaceMember- Specified by:
getAnnotationsin interfaceResolvedMember- Overrides:
getAnnotationsin classResolvedMemberImpl
-
getAnnotationOfType
- Specified by:
getAnnotationOfTypein interfaceAnnotatedElement- Overrides:
getAnnotationOfTypein classResolvedMemberImpl
-
getAnnotationDefaultValue
- Specified by:
getAnnotationDefaultValuein interfaceResolvedMember- Overrides:
getAnnotationDefaultValuein classResolvedMemberImpl
-
getAnnotationTypes
- Specified by:
getAnnotationTypesin interfaceAnnotatedElement- Specified by:
getAnnotationTypesin interfaceResolvedMember- Overrides:
getAnnotationTypesin classResolvedMemberImpl
-
getParameterAnnotationTypes
- Specified by:
getParameterAnnotationTypesin interfaceResolvedMember- Overrides:
getParameterAnnotationTypesin classResolvedMemberImpl
-
getParameterNames
- Specified by:
getParameterNamesin interfaceResolvedMember- Overrides:
getParameterNamesin classResolvedMemberImpl
-
isDefaultConstructor
public boolean isDefaultConstructor()Return true if this is the default constructor. The default constructor is the one generated if there isn't one in the source. Eclipse helpfully uses a bit to indicate the default constructor.- Specified by:
isDefaultConstructorin interfaceResolvedMember- Overrides:
isDefaultConstructorin classResolvedMemberImpl- Returns:
- true if this is the default constructor.
-