public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, ResolvedMember
Modifier and Type | Field and Description |
---|---|
protected AnnotationAJ[] |
annotations |
protected ResolvedType[] |
annotationTypes |
protected ResolvedMember |
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.
|
protected UnresolvedType[] |
checkedExceptions |
protected int |
end |
protected AnnotationAJ[][] |
parameterAnnotations |
protected ResolvedType[][] |
parameterAnnotationTypes |
static boolean |
showParameterNames |
protected ISourceContext |
sourceContext |
protected int |
start |
protected TypeVariable[] |
typeVariables |
declaringType, kind, modifiers, name, parameterTypes, returnType
NONE
ADVICE, CONSTRUCTOR, FIELD, HANDLER, METHOD, MONITORENTER, MONITOREXIT, NO_PARAMETER_ANNOTATION_TYPES, NO_PARAMETER_ANNOTATIONXS, POINTCUT, STATIC_INITIALIZATION
Constructor and Description |
---|
ResolvedMemberImpl(MemberKind kind,
UnresolvedType declaringType,
int modifiers,
java.lang.String name,
java.lang.String signature) |
ResolvedMemberImpl(MemberKind kind,
UnresolvedType declaringType,
int modifiers,
UnresolvedType returnType,
java.lang.String name,
UnresolvedType[] parameterTypes) |
ResolvedMemberImpl(MemberKind kind,
UnresolvedType declaringType,
int modifiers,
UnresolvedType returnType,
java.lang.String name,
UnresolvedType[] parameterTypes,
UnresolvedType[] checkedExceptions) |
ResolvedMemberImpl(MemberKind kind,
UnresolvedType declaringType,
int modifiers,
UnresolvedType returnType,
java.lang.String name,
UnresolvedType[] parameterTypes,
UnresolvedType[] checkedExceptions,
ResolvedMember backingGenericMember) |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(AnnotationAJ annotation) |
static void |
appendSigWithTypeVarBoundsRemoved(UnresolvedType aType,
java.lang.StringBuffer toBuffer,
java.util.Set<UnresolvedType> alreadyUsedTypeVars) |
void |
evictWeavingState() |
java.lang.String |
getAnnotationDefaultValue() |
AnnotationAJ |
getAnnotationOfType(UnresolvedType ofType) |
AnnotationAJ[] |
getAnnotations() |
ResolvedType[] |
getAnnotationTypes() |
ShadowMunger |
getAssociatedShadowMunger() |
ResolvedMember |
getBackingGenericMember() |
AjAttribute.EffectiveSignatureAttribute |
getEffectiveSignature() |
int |
getEnd()
The ending index of this location in the character stream
This points to the last character in this token.
|
UnresolvedType[] |
getExceptions() |
UnresolvedType[] |
getExceptions(World world) |
UnresolvedType[] |
getGenericParameterTypes()
Get the TypeXs of the parameter types, taking generic signature into account
|
UnresolvedType |
getGenericReturnType()
Get the UnresolvedType for the return type, taking generic signature into account
|
java.lang.String |
getGenericSignature() |
static JoinPointSignature[] |
getJoinPointSignatures(Member joinPointSignature,
World inAWorld)
Compute the full set of signatures for a member.
|
int |
getModifiers() |
int |
getModifiers(World world) |
AnnotationAJ[][] |
getParameterAnnotations() |
ResolvedType[][] |
getParameterAnnotationTypes() |
java.lang.String[] |
getParameterNames() |
java.lang.String[] |
getParameterNames(World world) |
java.lang.String |
getParameterSignatureErased()
Return the erased form of the signature with bounds collapsed for type variables, etc.
|
java.lang.String |
getSignatureErased() |
java.lang.String |
getSignatureForAttribute()
Return the member generic signature that would be suitable for inclusion in a class file Signature attribute.
|
ISourceContext |
getSourceContext() |
ISourceContext |
getSourceContext(World world) |
ISourceLocation |
getSourceLocation() |
int |
getStart()
The starting index of this location in the character stream.
|
TypeVariable |
getTypeVariableNamed(java.lang.String name) |
TypeVariable[] |
getTypeVariables() |
boolean |
hasAnnotation(UnresolvedType ofType)
Check if this member has an annotation of the specified type.
|
boolean |
hasAnnotations() |
boolean |
hasBackingGenericMember()
If this member is defined by a parameterized super-type, return the erasure of that member.
|
boolean |
isAbstract() |
boolean |
isAjSynthetic() |
boolean |
isAnnotatedElsewhere() |
boolean |
isBridgeMethod() |
boolean |
isCompatibleWith(Member am) |
boolean |
isDefault() |
boolean |
isDefaultConstructor() |
boolean |
isEquivalentTo(java.lang.Object other) |
boolean |
isPublic() |
boolean |
isSynthetic() |
boolean |
isVarargsMethod() |
boolean |
isVisible(ResolvedType fromType) |
boolean |
matches(ResolvedMember aCandidateMatch,
boolean ignoreGenerics)
Returns true if this member matches the other.
|
protected UnresolvedType |
parameterize(UnresolvedType aType,
java.util.Map<java.lang.String,UnresolvedType> typeVariableMap,
boolean inParameterizedType,
World w) |
ResolvedMember |
parameterizedWith(java.util.Map<java.lang.String,UnresolvedType> m,
World w)
Replace occurrences of type variables in the signature with values contained in the map.
|
ResolvedMemberImpl |
parameterizedWith(UnresolvedType[] typeParameters,
ResolvedType newDeclaringType,
boolean isParameterized) |
ResolvedMemberImpl |
parameterizedWith(UnresolvedType[] typeParameters,
ResolvedType newDeclaringType,
boolean isParameterized,
java.util.List<java.lang.String> aliases)
Return a resolvedmember in which all the type variables in the signature have been replaced with the given bindings.
|
static ResolvedMemberImpl |
readResolvedMember(VersionedDataInputStream s,
ISourceContext sourceContext) |
static ResolvedMember[] |
readResolvedMemberArray(VersionedDataInputStream s,
ISourceContext context) |
void |
resetKind(MemberKind newKind) |
void |
resetModifiers(int newModifiers) |
void |
resetName(java.lang.String newName)
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.
|
void |
resetReturnTypeToObjectArray() |
ResolvedMember |
resolve(World world) |
protected void |
setAjSynthetic(boolean b) |
void |
setAnnotatedElsewhere(boolean b) |
void |
setAnnotations(AnnotationAJ[] annotations) |
void |
setAnnotationTypes(ResolvedType[] annotationTypes) |
void |
setCheckedExceptions(UnresolvedType[] checkedExceptions) |
void |
setDeclaringType(ReferenceType rt) |
void |
setParameterNames(java.lang.String[] pnames) |
void |
setPosition(int sourceStart,
int sourceEnd) |
void |
setSourceContext(ISourceContext sourceContext) |
void |
setTypeVariables(TypeVariable[] tvars) |
void |
setVarargsMethod() |
java.lang.String |
toDebugString()
Useful for writing tests, returns *everything* we know about this member.
|
java.lang.String |
toGenericString() |
void |
write(CompressingDataOutputStream s) |
static void |
writeArray(ResolvedMember[] members,
CompressingDataOutputStream s) |
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, wipeJoinpointSignatures
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equalsApartFromDeclaringType
canBeParameterized, compareTo, getArity, getDeclaringType, getDeclaringTypes, getJoinPointSignatures, getKind, getName, getParameterSignature, getParameterTypes, getReturnType, getSignature, getType
protected UnresolvedType[] checkedExceptions
protected ResolvedMember backingGenericMember
protected AnnotationAJ[] annotations
protected ResolvedType[] annotationTypes
protected AnnotationAJ[][] parameterAnnotations
protected ResolvedType[][] parameterAnnotationTypes
protected TypeVariable[] typeVariables
protected int start
protected int end
protected ISourceContext sourceContext
public static boolean showParameterNames
public ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, java.lang.String name, UnresolvedType[] parameterTypes)
public ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, java.lang.String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions)
public ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, java.lang.String name, UnresolvedType[] parameterTypes, UnresolvedType[] checkedExceptions, ResolvedMember backingGenericMember)
public ResolvedMemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, java.lang.String name, java.lang.String signature)
public static JoinPointSignature[] getJoinPointSignatures(Member joinPointSignature, World inAWorld)
joinPointSignature
- inAWorld
- public final int getModifiers(World world)
getModifiers
in interface Member
getModifiers
in interface ResolvedMember
getModifiers
in class MemberImpl
public final int getModifiers()
getModifiers
in interface Member
getModifiers
in interface ResolvedMember
getModifiers
in class MemberImpl
public final UnresolvedType[] getExceptions(World world)
getExceptions
in interface Member
getExceptions
in interface ResolvedMember
getExceptions
in class MemberImpl
public UnresolvedType[] getExceptions()
getExceptions
in interface ResolvedMember
public ShadowMunger getAssociatedShadowMunger()
getAssociatedShadowMunger
in interface ResolvedMember
public boolean isAjSynthetic()
isAjSynthetic
in interface ResolvedMember
protected void setAjSynthetic(boolean b)
public boolean hasAnnotations()
public boolean hasAnnotation(UnresolvedType ofType)
hasAnnotation
in interface AnnotatedElement
hasAnnotation
in interface ResolvedMember
ofType
- the type of the annotation being searched forpublic ResolvedType[] getAnnotationTypes()
getAnnotationTypes
in interface AnnotatedElement
getAnnotationTypes
in interface ResolvedMember
public java.lang.String getAnnotationDefaultValue()
getAnnotationDefaultValue
in interface ResolvedMember
public AnnotationAJ[] getAnnotations()
getAnnotations
in interface Member
getAnnotations
in interface ResolvedMember
getAnnotations
in class MemberImpl
public AnnotationAJ getAnnotationOfType(UnresolvedType ofType)
getAnnotationOfType
in interface AnnotatedElement
public void setAnnotations(AnnotationAJ[] annotations)
setAnnotations
in interface ResolvedMember
public void setAnnotationTypes(ResolvedType[] annotationTypes)
setAnnotationTypes
in interface ResolvedMember
public ResolvedType[][] getParameterAnnotationTypes()
getParameterAnnotationTypes
in interface ResolvedMember
public AnnotationAJ[][] getParameterAnnotations()
getParameterAnnotations
in interface ResolvedMember
public void addAnnotation(AnnotationAJ annotation)
addAnnotation
in interface ResolvedMember
public boolean isBridgeMethod()
isBridgeMethod
in interface ResolvedMember
public boolean isVarargsMethod()
isVarargsMethod
in interface ResolvedMember
public void setVarargsMethod()
public boolean isSynthetic()
isSynthetic
in interface ResolvedMember
public void write(CompressingDataOutputStream s) throws java.io.IOException
write
in interface ResolvedMember
java.io.IOException
public java.lang.String getSignatureForAttribute()
public java.lang.String getGenericSignature()
public static void writeArray(ResolvedMember[] members, CompressingDataOutputStream s) throws java.io.IOException
java.io.IOException
public static ResolvedMemberImpl readResolvedMember(VersionedDataInputStream s, ISourceContext sourceContext) throws java.io.IOException
java.io.IOException
public static ResolvedMember[] readResolvedMemberArray(VersionedDataInputStream s, ISourceContext context) throws java.io.IOException
java.io.IOException
public ResolvedMember resolve(World world)
resolve
in interface Member
resolve
in class MemberImpl
public ISourceContext getSourceContext(World world)
getSourceContext
in interface ResolvedMember
public java.lang.String[] getParameterNames()
getParameterNames
in interface ResolvedMember
public final void setParameterNames(java.lang.String[] pnames)
setParameterNames
in interface ResolvedMember
public final java.lang.String[] getParameterNames(World world)
getParameterNames
in interface Member
getParameterNames
in interface ResolvedMember
getParameterNames
in class MemberImpl
public AjAttribute.EffectiveSignatureAttribute getEffectiveSignature()
getEffectiveSignature
in interface ResolvedMember
public ISourceLocation getSourceLocation()
getSourceLocation
in interface ResolvedMember
public int getEnd()
IHasPosition
getEnd
in interface IHasPosition
getEnd
in interface ResolvedMember
public ISourceContext getSourceContext()
getSourceContext
in interface ResolvedMember
public int getStart()
IHasPosition
getStart
in interface IHasPosition
getStart
in interface ResolvedMember
public void setPosition(int sourceStart, int sourceEnd)
setPosition
in interface ResolvedMember
public void setDeclaringType(ReferenceType rt)
public void setSourceContext(ISourceContext sourceContext)
setSourceContext
in interface ResolvedMember
public boolean isAbstract()
isAbstract
in interface ResolvedMember
public boolean isPublic()
isPublic
in interface ResolvedMember
public boolean isDefault()
isDefault
in interface ResolvedMember
public boolean isVisible(ResolvedType fromType)
isVisible
in interface ResolvedMember
public void setCheckedExceptions(UnresolvedType[] checkedExceptions)
setCheckedExceptions
in interface ResolvedMember
public void setAnnotatedElsewhere(boolean b)
setAnnotatedElsewhere
in interface ResolvedMember
public boolean isAnnotatedElsewhere()
isAnnotatedElsewhere
in interface ResolvedMember
public UnresolvedType getGenericReturnType()
getGenericReturnType
in interface Member
getGenericReturnType
in interface ResolvedMember
getGenericReturnType
in class MemberImpl
public UnresolvedType[] getGenericParameterTypes()
getGenericParameterTypes
in interface Member
getGenericParameterTypes
in interface ResolvedMember
getGenericParameterTypes
in class MemberImpl
public ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType, boolean isParameterized)
parameterizedWith
in interface ResolvedMember
public ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType, boolean isParameterized, java.util.List<java.lang.String> aliases)
parameterizedWith
in interface ResolvedMember
public ResolvedMember parameterizedWith(java.util.Map<java.lang.String,UnresolvedType> m, World w)
parameterizedWith
in interface ResolvedMember
public void setTypeVariables(TypeVariable[] tvars)
setTypeVariables
in interface ResolvedMember
public TypeVariable[] getTypeVariables()
getTypeVariables
in interface ResolvedMember
protected UnresolvedType parameterize(UnresolvedType aType, java.util.Map<java.lang.String,UnresolvedType> typeVariableMap, boolean inParameterizedType, World w)
public boolean hasBackingGenericMember()
hasBackingGenericMember
in interface ResolvedMember
public ResolvedMember getBackingGenericMember()
getBackingGenericMember
in interface ResolvedMember
public void resetName(java.lang.String newName)
public void resetKind(MemberKind newKind)
public void resetModifiers(int newModifiers)
public void resetReturnTypeToObjectArray()
public boolean matches(ResolvedMember aCandidateMatch, boolean ignoreGenerics)
matches
in interface ResolvedMember
public java.lang.String getParameterSignatureErased()
getParameterSignatureErased
in interface ResolvedMember
public java.lang.String getSignatureErased()
getSignatureErased
in interface ResolvedMember
public static void appendSigWithTypeVarBoundsRemoved(UnresolvedType aType, java.lang.StringBuffer toBuffer, java.util.Set<UnresolvedType> alreadyUsedTypeVars)
public java.lang.String toDebugString()
toDebugString
in interface ResolvedMember
public java.lang.String toGenericString()
toGenericString
in interface ResolvedMember
public boolean isCompatibleWith(Member am)
isCompatibleWith
in interface ResolvedMember
public TypeVariable getTypeVariableNamed(java.lang.String name)
getTypeVariableNamed
in interface TypeVariableDeclaringElement
public void evictWeavingState()
evictWeavingState
in interface ResolvedMember
public boolean isEquivalentTo(java.lang.Object other)
public boolean isDefaultConstructor()
isDefaultConstructor
in interface ResolvedMember