Top Fields Constructors Methods
org.aspectj.weaver.bcel

pack-priv Class BcelMethod

extends ResolvedMemberImpl
Class Inheritance
Known Direct Subclasses
org.aspectj.weaver.bcel.LazyMethodGen.LightweightBcelMethod
Imports
java.lang.reflect.Modifier, java.util.ArrayList, .List, .StringTokenizer, org.aspectj.apache.bcel.classfile.AnnotationDefault, .Attribute, .ExceptionTable, .JavaClass, .LineNumber, .LineNumberTable, .LocalVariable, .LocalVariableTable, .Method, org.aspectj.apache.bcel.classfile.annotation.AnnotationGen, .NameValuePair, org.aspectj.bridge.ISourceLocation, .SourceLocation, org.aspectj.util.GenericSignature, .GenericSignature.TypeVariableSignature, .GenericSignatureParser, org.aspectj.weaver.AjAttribute, .AjAttribute.WeaverVersionInfo, .AnnotationAJ, .BCException, .ISourceContext, .MemberKind, .ResolvedMemberImpl, .ResolvedPointcutDefinition, .ResolvedType, .ShadowMunger, .TypeVariable, .UnresolvedType, .World, org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.GenericSignatureFormatException

Field Summary

Modifier and TypeField and Description
private static final String
private ShadowMunger
private final BcelObjectType
private int
private static final int
private AjAttribute.MethodDeclarationLineNumberAttribute
private AjAttribute.EffectiveSignatureAttribute
private UnresolvedType[]
private UnresolvedType
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private Method
private static final char
private static final int
private ResolvedPointcutDefinition
private static final int
Inherited from org.aspectj.weaver.ResolvedMemberImpl:
annotationsannotationTypesbackingGenericMembercheckedExceptionsendparameterAnnotationsparameterAnnotationTypesshowParameterNamessourceContextstarttypeVariables

Constructor Summary

AccessConstructor and Description
pack-priv
BcelMethod(BcelObjectType declaringType, Method method)

pack-priv
BcelMethod(BcelObjectType declaringType, Method method, List<AjAttribute> attributes)

This constructor expects to be passed the attributes, rather than deserializing them.

Method Summary

Modifier and TypeMethod and Description
public void
public void
public boolean
canBeParameterized()

Overrides org.aspectj.weaver.MemberImpl.canBeParameterized.

Implements org.aspectj.weaver.Member.canBeParameterized.

A method can be parameterized if it has one or more generic parameters.
public void
private void
private void
public void
public String
public AnnotationAJ
public AnnotationAJ[]
public ResolvedType[]
public ShadowMunger
public String[]
getAttributeNames(boolean onlyIncludeAjOnes)

public int
public int
public AjAttribute.EffectiveSignatureAttribute
public UnresolvedType[]
public UnresolvedType
getGenericReturnType()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getGenericReturnType.

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

Return the parameterized/generic return type or the normal return type if the method is not generic.
public MemberKind
public int
public Method
getMethod()

For testing only

public AnnotationAJ[][]
public ResolvedType[][]
public String[]
public ISourceLocation
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

Returns:

true if this BcelMethod represents the default constructor
isDefaultConstructor
()

Overrides org.aspectj.weaver.ResolvedMemberImpl.isDefaultConstructor.

Implements org.aspectj.weaver.ResolvedMember.isDefaultConstructor.

Return true if the method represents the default constructor.
public boolean
isEquivalentTo(Object other)

Overrides org.aspectj.weaver.ResolvedMemberImpl.isEquivalentTo.

Returns whether or not the given object is equivalent to the current one.
public boolean
private void
public void
private void
private void
private void
private void
Inherited from org.aspectj.weaver.ResolvedMemberImpl:
appendSigWithTypeVarBoundsRemovedgetBackingGenericMembergetEndgetExceptionsgetExceptionsgetGenericSignaturegetJoinPointSignaturesgetModifiersgetModifiersgetParameterNamesgetParameterSignatureErasedgetSignatureErasedgetSignatureForAttributegetSourceContextgetSourceContextgetStartgetTypeVariableNamedgetTypeVariableshasAnnotationshasBackingGenericMemberisAbstractisAnnotatedElsewhereisBridgeMethodisCompatibleWithisDefaultisPublicisVarargsMethodisVisiblematchesparameterizeparameterizedWithparameterizedWithparameterizedWithreadResolvedMemberreadResolvedMemberArrayresetKindresetModifiersresetNameresetReturnTypeToObjectArrayresolvesetAjSyntheticsetAnnotatedElsewheresetAnnotationssetAnnotationTypessetCheckedExceptionssetDeclaringTypesetParameterNamessetPositionsetSourceContextsetTypeVariablessetVarargsMethodtoDebugStringtoGenericStringwritewriteArray

Field Detail

ASPECTJ_ANNOTATION_PACKAGEback to summary
private static final String ASPECTJ_ANNOTATION_PACKAGE
associatedShadowMungerback to summary
private ShadowMunger associatedShadowMunger
bcelObjectTypeback to summary
private final BcelObjectType bcelObjectType
bitflagsback to summary
private int bitflags
CAN_BE_PARAMETERIZEDback to summary
private static final int CAN_BE_PARAMETERIZED
declarationLineNumberback to summary
private AjAttribute.MethodDeclarationLineNumberAttribute declarationLineNumber
effectiveSignatureback to summary
private AjAttribute.EffectiveSignatureAttribute effectiveSignature
genericParameterTypesback to summary
private UnresolvedType[] genericParameterTypes
genericReturnTypeback to summary
private UnresolvedType genericReturnType
HAS_ANNOTATIONSback to summary
private static final int HAS_ANNOTATIONS
HAVE_DETERMINED_ANNOTATIONSback to summary
private static final int HAVE_DETERMINED_ANNOTATIONS
IS_AJ_SYNTHETICback to summary
private static final int IS_AJ_SYNTHETIC
IS_SYNTHETICback to summary
private static final int IS_SYNTHETIC
IS_SYNTHETIC_INVERSEback to summary
private static final int IS_SYNTHETIC_INVERSE
KNOW_IF_SYNTHETICback to summary
private static final int KNOW_IF_SYNTHETIC
methodback to summary
private Method method
PACKAGE_INITIAL_CHARback to summary
private static final char PACKAGE_INITIAL_CHAR
PARAMETER_NAMES_INITIALIZEDback to summary
private static final int PARAMETER_NAMES_INITIALIZED
preResolvedPointcutback to summary
private ResolvedPointcutDefinition preResolvedPointcut
UNPACKED_GENERIC_SIGNATUREback to summary
private static final int UNPACKED_GENERIC_SIGNATURE

Constructor Detail

BcelMethodback to summary
pack-priv BcelMethod(BcelObjectType declaringType, Method method)
BcelMethodback to summary
pack-priv BcelMethod(BcelObjectType declaringType, Method method, List<AjAttribute> attributes)

This constructor expects to be passed the attributes, rather than deserializing them.

Method Detail

addAnnotationback to summary
public void addAnnotation(AnnotationAJ annotation)

Overrides org.aspectj.weaver.ResolvedMemberImpl.addAnnotation.

Implements org.aspectj.weaver.ResolvedMember.addAnnotation.

Annotations
@Override
addParameterAnnotationback to summary
public void addParameterAnnotation(int param, AnnotationAJ anno)
canBeParameterizedback to summary
public boolean canBeParameterized()

Overrides org.aspectj.weaver.MemberImpl.canBeParameterized.

Implements org.aspectj.weaver.Member.canBeParameterized.

A method can be parameterized if it has one or more generic parameters. A generic parameter (type variable parameter) is identified by the prefix "T"

Annotations
@Override
determineParameterNamesback to summary
public void determineParameterNames()
ensureAnnotationsRetrievedback to summary
private void ensureAnnotationsRetrieved()
ensureParameterAnnotationsRetrievedback to summary
private void ensureParameterAnnotationsRetrieved()
evictWeavingStateback to summary
public void evictWeavingState()

Overrides org.aspectj.weaver.ResolvedMemberImpl.evictWeavingState.

Implements org.aspectj.weaver.ResolvedMember.evictWeavingState.

Annotations
@Override
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
getAnnotationsback to summary
public AnnotationAJ[] getAnnotations()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getAnnotations.

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

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

Overrides org.aspectj.weaver.ResolvedMemberImpl.getAnnotationTypes.

Implements org.aspectj.weaver.ResolvedMember.getAnnotationTypes.

Annotations
@Override
getAssociatedShadowMungerback to summary
public ShadowMunger getAssociatedShadowMunger()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getAssociatedShadowMunger.

Implements org.aspectj.weaver.ResolvedMember.getAssociatedShadowMunger.

Annotations
@Override
getAttributeNamesback to summary
public String[] getAttributeNames(boolean onlyIncludeAjOnes)
getDeclarationLineNumberback to summary
public int getDeclarationLineNumber()
getDeclarationOffsetback to summary
public int getDeclarationOffset()
getEffectiveSignatureback to summary
public AjAttribute.EffectiveSignatureAttribute getEffectiveSignature()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getEffectiveSignature.

Implements org.aspectj.weaver.ResolvedMember.getEffectiveSignature.

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.

Return the parameterized/generic return type or the normal return type if the method is not generic.

Annotations
@Override
getKindback to summary
public MemberKind getKind()

Overrides org.aspectj.weaver.MemberImpl.getKind.

Implements org.aspectj.weaver.Member.getKind.

Returns:MemberKind

Doc from org.aspectj.weaver.Member.getKind.

the kind of member from those listed as MemberKind instances

Annotations
@Override
getLineNumberOfFirstInstructionback to summary
public int getLineNumberOfFirstInstruction()
getMethodback to summary
public Method getMethod()

For testing only

getParameterAnnotationsback to summary
public AnnotationAJ[][] getParameterAnnotations()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getParameterAnnotations.

Implements org.aspectj.weaver.ResolvedMember.getParameterAnnotations.

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

Overrides org.aspectj.weaver.ResolvedMemberImpl.getParameterAnnotationTypes.

Implements org.aspectj.weaver.ResolvedMember.getParameterAnnotationTypes.

Annotations
@Override
getParameterNamesback to summary
public String[] getParameterNames()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getParameterNames.

Implements org.aspectj.weaver.ResolvedMember.getParameterNames.

Annotations
@Override
getSourceLocationback to summary
public ISourceLocation getSourceLocation()

Overrides org.aspectj.weaver.ResolvedMemberImpl.getSourceLocation.

Implements org.aspectj.weaver.ResolvedMember.getSourceLocation.

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
hasDeclarationLineNumberInfoback to summary
public boolean hasDeclarationLineNumberInfo()
isAjSyntheticback to summary
public boolean isAjSynthetic()

Overrides org.aspectj.weaver.ResolvedMemberImpl.isAjSynthetic.

Implements org.aspectj.weaver.ResolvedMember.isAjSynthetic.

Annotations
@Override
isDefaultConstructorback to summary
public boolean isDefaultConstructor()

Overrides org.aspectj.weaver.ResolvedMemberImpl.isDefaultConstructor.

Implements org.aspectj.weaver.ResolvedMember.isDefaultConstructor.

Return true if the method represents the default constructor. Hard to determine this from bytecode, but the existence of the MethodDeclarationLineNumber attribute should tell us.

Returns:boolean

true if this BcelMethod represents the default constructor

Annotations
@Override
isEquivalentToback to summary
public boolean isEquivalentTo(Object other)

Overrides org.aspectj.weaver.ResolvedMemberImpl.isEquivalentTo.

Returns whether or not the given object is equivalent to the current one. Returns true if getMethod().getCode().getCodeString() are equal. Allows for different line number tables.

Annotations
@Override
isSyntheticback to summary
public boolean isSynthetic()

Overrides org.aspectj.weaver.ResolvedMemberImpl.isSynthetic.

Implements org.aspectj.weaver.ResolvedMember.isSynthetic.

Annotations
@Override
processAttributesback to summary
private void processAttributes(World world, List<AjAttribute> as)
removeAnnotationback to summary
public void removeAnnotation(ResolvedType annotationType)
unpackAjAttributesback to summary
private void unpackAjAttributes(World world)
unpackGenericSignatureback to summary
private void unpackGenericSignature()
unpackJavaAttributesback to summary
private void unpackJavaAttributes()
workOutIfSyntheticback to summary
private void workOutIfSynthetic()