org.aspectj.weaver
Class MemberImpl

java.lang.Object
  extended by org.aspectj.weaver.MemberImpl
All Implemented Interfaces:
java.lang.Comparable<Member>, Member
Direct Known Subclasses:
ResolvedMemberImpl

public class MemberImpl
extends java.lang.Object
implements Member


Field Summary
protected  UnresolvedType declaringType
           
protected  MemberKind kind
           
protected  int modifiers
           
protected  java.lang.String name
           
protected  UnresolvedType[] parameterTypes
           
protected  UnresolvedType returnType
           
 
Fields inherited from interface org.aspectj.weaver.Member
ADVICE, CONSTRUCTOR, FIELD, HANDLER, METHOD, MONITORENTER, MONITOREXIT, NO_PARAMETER_ANNOTATION_TYPES, NO_PARAMETER_ANNOTATIONXS, NONE, POINTCUT, STATIC_INITIALIZATION
 
Constructor Summary
MemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, java.lang.String name, java.lang.String erasedSignature)
          Construct a MemberImpl using an erased signature for the parameters and return type (member method/ctor) or type (member field)
MemberImpl(MemberKind kind, UnresolvedType declaringType, int modifiers, UnresolvedType returnType, java.lang.String name, UnresolvedType[] parameterTypes)
          Construct a MemberImpl using real type information for the parameters and return type (member method/ctor) or type (member field)
 
Method Summary
 boolean canBeParameterized()
          Returns true iff the member is generic (NOT parameterized)
 int compareTo(Member other)
           
 boolean equals(java.lang.Object other)
           
 boolean equalsApartFromDeclaringType(java.lang.Object other)
           
static MemberImpl field(java.lang.String declaring, int mods, java.lang.String name, java.lang.String signature)
           
 AnnotationAJ[] getAnnotations()
           
 int getArity()
           
 UnresolvedType getDeclaringType()
           
 java.util.Collection<ResolvedType> getDeclaringTypes(World world)
           
 UnresolvedType[] getExceptions(World world)
           
 UnresolvedType[] getGenericParameterTypes()
           
 UnresolvedType getGenericReturnType()
           
 JoinPointSignatureIterator getJoinPointSignatures(World inAWorld)
          All the signatures that a join point with this member as its signature has.
 MemberKind getKind()
           
 int getModifiers()
           
 int getModifiers(World world)
           
 java.lang.String getName()
           
 java.lang.String[] getParameterNames(World world)
           
 java.lang.String getParameterSignature()
          Return signature without return type, e.g.
 UnresolvedType[] getParameterTypes()
           
 UnresolvedType getReturnType()
           
 java.lang.String getSignature()
          Return full signature, including return type, e.g.
 UnresolvedType getType()
           
 int hashCode()
           
 boolean isInterface()
           
 boolean isPrivate()
           
 boolean isStatic()
           
static ResolvedMemberImpl makeExceptionHandlerSignature(UnresolvedType inType, UnresolvedType catchType)
           
static MemberImpl method(UnresolvedType declaring, int mods, java.lang.String name, java.lang.String signature)
           
static MemberImpl method(UnresolvedType declTy, int mods, UnresolvedType rTy, java.lang.String name, UnresolvedType[] paramTys)
           
static MemberImpl monitorEnter()
           
static MemberImpl monitorExit()
           
static Member pointcut(UnresolvedType declaring, java.lang.String name, java.lang.String signature)
           
 ResolvedMember resolve(World world)
           
 java.lang.String toString()
           
static java.lang.String typesToSignature(UnresolvedType[] paramTypes)
          Returns "(,...)" - unlike the other typesToSignature that also includes the return type, this one just deals with the parameter types.
static java.lang.String typesToSignature(UnresolvedType returnType, UnresolvedType[] paramTypes, boolean eraseGenerics)
          Build a signature based on the return type and parameter types.
 void wipeJoinpointSignatures()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

kind

protected MemberKind kind

modifiers

protected int modifiers

name

protected java.lang.String name

declaringType

protected UnresolvedType declaringType

returnType

protected UnresolvedType returnType

parameterTypes

protected UnresolvedType[] parameterTypes
Constructor Detail

MemberImpl

public MemberImpl(MemberKind kind,
                  UnresolvedType declaringType,
                  int modifiers,
                  java.lang.String name,
                  java.lang.String erasedSignature)
Construct a MemberImpl using an erased signature for the parameters and return type (member method/ctor) or type (member field)


MemberImpl

public MemberImpl(MemberKind kind,
                  UnresolvedType declaringType,
                  int modifiers,
                  UnresolvedType returnType,
                  java.lang.String name,
                  UnresolvedType[] parameterTypes)
Construct a MemberImpl using real type information for the parameters and return type (member method/ctor) or type (member field)

Method Detail

resolve

public ResolvedMember resolve(World world)
Specified by:
resolve in interface Member

typesToSignature

public static java.lang.String typesToSignature(UnresolvedType returnType,
                                                UnresolvedType[] paramTypes,
                                                boolean eraseGenerics)
Build a signature based on the return type and parameter types. For example: "(Ljava/util/Set;)V" or "(Ljava/util/Set;)V". The latter form shows what happens when the generics are erased


typesToSignature

public static java.lang.String typesToSignature(UnresolvedType[] paramTypes)
Returns "(,...)" - unlike the other typesToSignature that also includes the return type, this one just deals with the parameter types.


field

public static MemberImpl field(java.lang.String declaring,
                               int mods,
                               java.lang.String name,
                               java.lang.String signature)

method

public static MemberImpl method(UnresolvedType declaring,
                                int mods,
                                java.lang.String name,
                                java.lang.String signature)

monitorEnter

public static MemberImpl monitorEnter()

monitorExit

public static MemberImpl monitorExit()

pointcut

public static Member pointcut(UnresolvedType declaring,
                              java.lang.String name,
                              java.lang.String signature)

method

public static MemberImpl method(UnresolvedType declTy,
                                int mods,
                                UnresolvedType rTy,
                                java.lang.String name,
                                UnresolvedType[] paramTys)

makeExceptionHandlerSignature

public static ResolvedMemberImpl makeExceptionHandlerSignature(UnresolvedType inType,
                                                               UnresolvedType catchType)

equals

public final boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

equalsApartFromDeclaringType

public final boolean equalsApartFromDeclaringType(java.lang.Object other)
Returns:
true if this member equals the one supplied in every respect other than the declaring type

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(Member other)
Specified by:
compareTo in interface java.lang.Comparable<Member>
Specified by:
compareTo in interface Member

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getKind

public MemberKind getKind()
Specified by:
getKind in interface Member
Returns:
the kind of member from those listed as MemberKind instances

getDeclaringType

public UnresolvedType getDeclaringType()
Specified by:
getDeclaringType in interface Member

getReturnType

public UnresolvedType getReturnType()
Specified by:
getReturnType in interface Member

getGenericReturnType

public UnresolvedType getGenericReturnType()
Specified by:
getGenericReturnType in interface Member

getGenericParameterTypes

public UnresolvedType[] getGenericParameterTypes()
Specified by:
getGenericParameterTypes in interface Member

getType

public final UnresolvedType getType()
Specified by:
getType in interface Member

getName

public java.lang.String getName()
Specified by:
getName in interface Member

getParameterTypes

public UnresolvedType[] getParameterTypes()
Specified by:
getParameterTypes in interface Member

getSignature

public java.lang.String getSignature()
Description copied from interface: Member
Return full signature, including return type, e.g. "()LFastCar;". For a signature without the return type, use getParameterSignature() - it is important to choose the right one in the face of covariance.

Specified by:
getSignature in interface Member

getArity

public int getArity()
Specified by:
getArity in interface Member

getParameterSignature

public java.lang.String getParameterSignature()
Description copied from interface: Member
Return signature without return type, e.g. "()" for a signature *with* the return type, use getSignature() - it is important to choose the right one in the face of covariance.

Specified by:
getParameterSignature in interface Member

getModifiers

public int getModifiers(World world)
Specified by:
getModifiers in interface Member

getExceptions

public UnresolvedType[] getExceptions(World world)
Specified by:
getExceptions in interface Member

isStatic

public final boolean isStatic()

isInterface

public final boolean isInterface()

isPrivate

public final boolean isPrivate()

canBeParameterized

public boolean canBeParameterized()
Description copied from interface: Member
Returns true iff the member is generic (NOT parameterized)

Specified by:
canBeParameterized in interface Member

getModifiers

public int getModifiers()
Specified by:
getModifiers in interface Member

getAnnotations

public AnnotationAJ[] getAnnotations()
Specified by:
getAnnotations in interface Member

getDeclaringTypes

public java.util.Collection<ResolvedType> getDeclaringTypes(World world)
Specified by:
getDeclaringTypes in interface Member

getParameterNames

public java.lang.String[] getParameterNames(World world)
Specified by:
getParameterNames in interface Member

getJoinPointSignatures

public JoinPointSignatureIterator getJoinPointSignatures(World inAWorld)
All the signatures that a join point with this member as its signature has.

Specified by:
getJoinPointSignatures in interface Member

wipeJoinpointSignatures

public void wipeJoinpointSignatures()