Package org.aspectj.weaver
Klasse ResolvedMemberImpl
java.lang.Object
org.aspectj.weaver.MemberImpl
org.aspectj.weaver.ResolvedMemberImpl
- Alle implementierten Schnittstellen:
Comparable<Member>,AnnotatedElement,IHasPosition,Member,ResolvedMember,TypeVariableDeclaringElement
- Bekannte direkte Unterklassen:
ReflectionBasedResolvedMemberImpl,ResolvedPointcutDefinition
Represent a resolved member. Components of it are expected to exist. This member will correspond to a real member *unless* it is
being used to represent the effect of an ITD.
- Autor:
- PARC, Andy Clement
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected 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[]Von Klasse geerbte Felder org.aspectj.weaver.MemberImpl
declaringType, kind, modifiers, name, parameterTypes, returnTypeVon Schnittstelle geerbte Felder org.aspectj.weaver.Member
ADVICE, CONSTRUCTOR, FIELD, HANDLER, METHOD, MONITORENTER, MONITOREXIT, NO_PARAMETER_ANNOTATION_TYPES, NO_PARAMETER_ANNOTATIONXS, NONE, POINTCUT, STATIC_INITIALIZATIONVon Schnittstelle geerbte Felder org.aspectj.weaver.ResolvedMember
NONE -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, String name, String signature) ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes) ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions) ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions, ResolvedMember backingGenericMember) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddAnnotation(AnnotationAJ annotation) static voidappendSigWithTypeVarBoundsRemoved(UnresolvedType aType, StringBuffer toBuffer, Set<UnresolvedType> alreadyUsedTypeVars) voidgetAnnotationOfType(UnresolvedType ofType) intgetEnd()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[][]ResolvedType[][]String[]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) booleanhasAnnotation(UnresolvedType ofType) Check if this member has an annotation of the specified type.booleanbooleanIf this member is defined by a parameterized super-type, return the erasure of that member.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisEquivalentTo(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) 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) Von Klasse geerbte Methoden org.aspectj.weaver.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, wipeJoinpointSignaturesVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden org.aspectj.weaver.Member
canBeParameterized, compareTo, getArity, getDeclaringType, getDeclaringTypes, getJoinPointSignatures, getKind, getName, getParameterSignature, getParameterTypes, getReturnType, getSignature, getTypeVon Schnittstelle geerbte Methoden org.aspectj.weaver.ResolvedMember
equalsApartFromDeclaringType
-
Felddetails
-
checkedExceptions
-
backingGenericMember
if this member is a parameterized version of a member in a generic type, then this field holds a reference to the member we parameterize. -
annotations
-
annotationTypes
-
parameterAnnotations
-
parameterAnnotationTypes
-
typeVariables
-
start
protected int start -
end
protected int end -
sourceContext
-
showParameterNames
public static boolean showParameterNames
-
-
Konstruktordetails
-
ResolvedMemberImpl
public ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes) -
ResolvedMemberImpl
public ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions) -
ResolvedMemberImpl
public ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions, ResolvedMember backingGenericMember) -
ResolvedMemberImpl
public ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, String name, String signature)
-
-
Methodendetails
-
getJoinPointSignatures
public static JoinPointSignature[] getJoinPointSignatures(Member joinPointSignature, World inAWorld) Compute the full set of signatures for a member. This walks up the hierarchy giving the ResolvedMember in each defining type in the hierarchy. A shadowMember can be created with a target type (declaring type) that does not actually define the member. This is ok as long as the member is inherited in the declaring type. Each declaring type in the line to the actual declaring type is added as an additional signature. For example: class A { void foo(); } class B extends A {} shadowMember : void B.foo() gives { void B.foo(), void A.foo() }- Parameter:
joinPointSignature-inAWorld-
-
getModifiers
- Angegeben von:
getModifiersin SchnittstelleMember- Angegeben von:
getModifiersin SchnittstelleResolvedMember- Setzt außer Kraft:
getModifiersin KlasseMemberImpl
-
getModifiers
public final int getModifiers()- Angegeben von:
getModifiersin SchnittstelleMember- Angegeben von:
getModifiersin SchnittstelleResolvedMember- Setzt außer Kraft:
getModifiersin KlasseMemberImpl
-
getExceptions
- Angegeben von:
getExceptionsin SchnittstelleMember- Angegeben von:
getExceptionsin SchnittstelleResolvedMember- Setzt außer Kraft:
getExceptionsin KlasseMemberImpl
-
getExceptions
- Angegeben von:
getExceptionsin SchnittstelleResolvedMember
-
getAssociatedShadowMunger
- Angegeben von:
getAssociatedShadowMungerin SchnittstelleResolvedMember
-
isAjSynthetic
public boolean isAjSynthetic()- Angegeben von:
isAjSyntheticin SchnittstelleResolvedMember
-
setAjSynthetic
protected void setAjSynthetic(boolean b) -
hasAnnotations
public boolean hasAnnotations() -
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.- Angegeben von:
hasAnnotationin SchnittstelleAnnotatedElement- Angegeben von:
hasAnnotationin SchnittstelleResolvedMember- Parameter:
ofType- the type of the annotation being searched for- Gibt zurück:
- true if the annotation is found on this member or its backing generic member
-
getAnnotationTypes
- Angegeben von:
getAnnotationTypesin SchnittstelleAnnotatedElement- Angegeben von:
getAnnotationTypesin SchnittstelleResolvedMember
-
getAnnotationDefaultValue
- Angegeben von:
getAnnotationDefaultValuein SchnittstelleResolvedMember
-
getAnnotations
- Angegeben von:
getAnnotationsin SchnittstelleMember- Angegeben von:
getAnnotationsin SchnittstelleResolvedMember- Setzt außer Kraft:
getAnnotationsin KlasseMemberImpl
-
getAnnotationOfType
- Angegeben von:
getAnnotationOfTypein SchnittstelleAnnotatedElement
-
setAnnotations
- Angegeben von:
setAnnotationsin SchnittstelleResolvedMember
-
setAnnotationTypes
- Angegeben von:
setAnnotationTypesin SchnittstelleResolvedMember
-
getParameterAnnotationTypes
- Angegeben von:
getParameterAnnotationTypesin SchnittstelleResolvedMember
-
getParameterAnnotations
- Angegeben von:
getParameterAnnotationsin SchnittstelleResolvedMember
-
addAnnotation
- Angegeben von:
addAnnotationin SchnittstelleResolvedMember
-
isBridgeMethod
public boolean isBridgeMethod()- Angegeben von:
isBridgeMethodin SchnittstelleResolvedMember
-
isVarargsMethod
public boolean isVarargsMethod()- Angegeben von:
isVarargsMethodin SchnittstelleResolvedMember
-
setVarargsMethod
public void setVarargsMethod() -
isSynthetic
public boolean isSynthetic()- Angegeben von:
isSyntheticin SchnittstelleResolvedMember
-
write
- Angegeben von:
writein SchnittstelleResolvedMember- Löst aus:
IOException
-
getSignatureForAttribute
Return the member generic signature that would be suitable for inclusion in a class file Signature attribute. For: <T> List<String> getThem(T t) {} we would create: <T:Ljava/lang/Object;>(TT;)Ljava/util/List<Ljava/lang/String;>;;- Gibt zurück:
- the generic signature for the member that could be inserted into a class file
-
getGenericSignature
-
writeArray
public static void writeArray(ResolvedMember[] members, CompressingDataOutputStream s) throws IOException - Löst aus:
IOException
-
readResolvedMember
public static ResolvedMemberImpl readResolvedMember(VersionedDataInputStream s, ISourceContext sourceContext) throws IOException - Löst aus:
IOException
-
readResolvedMemberArray
public static ResolvedMember[] readResolvedMemberArray(VersionedDataInputStream s, ISourceContext context) throws IOException - Löst aus:
IOException
-
resolve
- Angegeben von:
resolvein SchnittstelleMember- Setzt außer Kraft:
resolvein KlasseMemberImpl
-
getSourceContext
- Angegeben von:
getSourceContextin SchnittstelleResolvedMember
-
getParameterNames
- Angegeben von:
getParameterNamesin SchnittstelleResolvedMember
-
setParameterNames
- Angegeben von:
setParameterNamesin SchnittstelleResolvedMember
-
getParameterNames
- Angegeben von:
getParameterNamesin SchnittstelleMember- Angegeben von:
getParameterNamesin SchnittstelleResolvedMember- Setzt außer Kraft:
getParameterNamesin KlasseMemberImpl
-
getEffectiveSignature
- Angegeben von:
getEffectiveSignaturein SchnittstelleResolvedMember
-
getSourceLocation
- Angegeben von:
getSourceLocationin SchnittstelleResolvedMember
-
getEnd
public int getEnd()Beschreibung aus Schnittstelle kopiert:IHasPositionThe ending index of this location in the character stream This points to the last character in this token. If a location truly had no contents, then start == end + 1. We don't recommend this.- Angegeben von:
getEndin SchnittstelleIHasPosition- Angegeben von:
getEndin SchnittstelleResolvedMember
-
getSourceContext
- Angegeben von:
getSourceContextin SchnittstelleResolvedMember
-
getStart
public int getStart()Beschreibung aus Schnittstelle kopiert:IHasPositionThe starting index of this location in the character stream.- Angegeben von:
getStartin SchnittstelleIHasPosition- Angegeben von:
getStartin SchnittstelleResolvedMember
-
setPosition
public void setPosition(int sourceStart, int sourceEnd) - Angegeben von:
setPositionin SchnittstelleResolvedMember
-
setDeclaringType
-
setSourceContext
- Angegeben von:
setSourceContextin SchnittstelleResolvedMember
-
isAbstract
public boolean isAbstract()- Angegeben von:
isAbstractin SchnittstelleResolvedMember
-
isPublic
public boolean isPublic()- Angegeben von:
isPublicin SchnittstelleResolvedMember
-
isDefault
public boolean isDefault()- Angegeben von:
isDefaultin SchnittstelleResolvedMember
-
isVisible
- Angegeben von:
isVisiblein SchnittstelleResolvedMember
-
setCheckedExceptions
- Angegeben von:
setCheckedExceptionsin SchnittstelleResolvedMember
-
setAnnotatedElsewhere
public void setAnnotatedElsewhere(boolean b) - Angegeben von:
setAnnotatedElsewherein SchnittstelleResolvedMember
-
isAnnotatedElsewhere
public boolean isAnnotatedElsewhere()- Angegeben von:
isAnnotatedElsewherein SchnittstelleResolvedMember
-
getGenericReturnType
Get the UnresolvedType for the return type, taking generic signature into account- Angegeben von:
getGenericReturnTypein SchnittstelleMember- Angegeben von:
getGenericReturnTypein SchnittstelleResolvedMember- Setzt außer Kraft:
getGenericReturnTypein KlasseMemberImpl
-
getGenericParameterTypes
Get the TypeXs of the parameter types, taking generic signature into account- Angegeben von:
getGenericParameterTypesin SchnittstelleMember- Angegeben von:
getGenericParameterTypesin SchnittstelleResolvedMember- Setzt außer Kraft:
getGenericParameterTypesin KlasseMemberImpl
-
parameterizedWith
public ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType, boolean isParameterized) - Angegeben von:
parameterizedWithin SchnittstelleResolvedMember
-
parameterizedWith
public ResolvedMemberImpl 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. The 'isParameterized' flag tells us whether we are creating a raw type version or not. if (isParameterized) then List<T> will turn into List<String> (for example) - if (!isParameterized) then List<T> will turn into List.- Angegeben von:
parameterizedWithin SchnittstelleResolvedMember
-
parameterizedWith
Replace occurrences of type variables in the signature with values contained in the map. The map is of the form A=String,B=Integer and so a signature List<A> Foo.m(B i) {} would become List<String> Foo.m(Integer i) {}- Angegeben von:
parameterizedWithin SchnittstelleResolvedMember
-
setTypeVariables
- Angegeben von:
setTypeVariablesin SchnittstelleResolvedMember
-
getTypeVariables
- Angegeben von:
getTypeVariablesin SchnittstelleResolvedMember
-
parameterize
protected UnresolvedType parameterize(UnresolvedType aType, Map<String, UnresolvedType> typeVariableMap, boolean inParameterizedType, World w) -
hasBackingGenericMember
public boolean hasBackingGenericMember()If this member is defined by a parameterized super-type, return the erasure of that member. For example: interface I<T> { T foo(T aTea); } class C implements I<String> { String foo(String aString) { return "something"; } } The resolved member for C.foo has signature String foo(String). The erasure of that member is Object foo(Object) -- use upper bound of type variable. A type is a supertype of itself.- Angegeben von:
hasBackingGenericMemberin SchnittstelleResolvedMember
-
getBackingGenericMember
- Angegeben von:
getBackingGenericMemberin SchnittstelleResolvedMember
-
resetName
For ITDs, we use the default factory methods to build a resolved member, then alter a couple of characteristics using this method - this is safe. -
resetKind
-
resetModifiers
public void resetModifiers(int newModifiers) -
resetReturnTypeToObjectArray
public void resetReturnTypeToObjectArray() -
matches
Returns true if this member matches the other. The matching takes into account name and parameter types only. When comparing parameter types, we allow any type variable to match any other type variable regardless of bounds.- Angegeben von:
matchesin SchnittstelleResolvedMember
-
getParameterSignatureErased
Return the erased form of the signature with bounds collapsed for type variables, etc. Does not include the return type, @see getParam- Angegeben von:
getParameterSignatureErasedin SchnittstelleResolvedMember
-
getSignatureErased
- Angegeben von:
getSignatureErasedin SchnittstelleResolvedMember
-
appendSigWithTypeVarBoundsRemoved
public static void appendSigWithTypeVarBoundsRemoved(UnresolvedType aType, StringBuffer toBuffer, Set<UnresolvedType> alreadyUsedTypeVars) -
toDebugString
Useful for writing tests, returns *everything* we know about this member.- Angegeben von:
toDebugStringin SchnittstelleResolvedMember
-
toGenericString
- Angegeben von:
toGenericStringin SchnittstelleResolvedMember
-
isCompatibleWith
- Angegeben von:
isCompatibleWithin SchnittstelleResolvedMember
-
getTypeVariableNamed
- Angegeben von:
getTypeVariableNamedin SchnittstelleTypeVariableDeclaringElement
-
evictWeavingState
public void evictWeavingState()- Angegeben von:
evictWeavingStatein SchnittstelleResolvedMember
-
isEquivalentTo
-
isDefaultConstructor
public boolean isDefaultConstructor()- Angegeben von:
isDefaultConstructorin SchnittstelleResolvedMember
-