Top Description Methods
org.aspectj.weaver.tools

public Interface StandardPointcutExpression

Known Direct Implementers
org.aspectj.weaver.internal.tools.StandardPointcutExpressionImpl
Imports
org.aspectj.weaver.ResolvedMember, .ResolvedType

Represents an AspectJ pointcut expression and provides convenience methods to determine whether or not the pointcut matches join points specified in terms of the java.lang.reflect interfaces.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true iff this pointcut may match a join point within(aClass), and false otherwise
couldMatchJoinPointsInType
(Class<T>
the candidate class
aClass
)

Determine whether or not this pointcut could ever match a join point in the given class.

public String
getPointcutExpression()

Return a string representation of this pointcut expression.

public ShadowMatch

Returns:

a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing a call to this method during the execution of the given member.
matchesMethodCall
(ResolvedMember
the method being called
aMethod
,
ResolvedMember
the Method or Constructor from within which the call is made
withinCode
)

Determine whether or not this pointcut matches a method call to the given method, made during the execution of the given method or constructor.

public ShadowMatch

Returns:

a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing the execution of the method.
matchesMethodExecution
(ResolvedMember
the method being executed
aMethod
)

Determine whether or not this pointcut matches the execution of a given method.

public ShadowMatch

Returns:

a ShadowMatch indicating whether the pointcut always, sometimes, or never matchs join points representing the static initialization of the given type
matchesStaticInitialization
(ResolvedType
the class being statically initialized
aType
)

Determine whether or not this pointcut matches the static initialization of the given class.

public boolean
mayNeedDynamicTest()

Returns true iff this pointcut contains any expression that might necessitate a dynamic test at some join point (e.g. args)

public void
setMatchingContext(MatchingContext aMatchContext)

Set the matching context to be used for subsequent calls to match.

Method Detail

couldMatchJoinPointsInTypeback to summary
public boolean couldMatchJoinPointsInType(Class<T> aClass)

Determine whether or not this pointcut could ever match a join point in the given class.

Parameters
aClass:Class<T>

the candidate class

Returns:boolean

true iff this pointcut may match a join point within(aClass), and false otherwise

getPointcutExpressionback to summary
public String getPointcutExpression()

Return a string representation of this pointcut expression.

matchesMethodCallback to summary
public ShadowMatch matchesMethodCall(ResolvedMember aMethod, ResolvedMember withinCode)

Determine whether or not this pointcut matches a method call to the given method, made during the execution of the given method or constructor.

Parameters
aMethod:ResolvedMember

the method being called

withinCode:ResolvedMember

the Method or Constructor from within which the call is made

Returns:ShadowMatch

a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing a call to this method during the execution of the given member.

matchesMethodExecutionback to summary
public ShadowMatch matchesMethodExecution(ResolvedMember aMethod)

Determine whether or not this pointcut matches the execution of a given method.

Parameters
aMethod:ResolvedMember

the method being executed

Returns:ShadowMatch

a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing the execution of the method.

matchesStaticInitializationback to summary
public ShadowMatch matchesStaticInitialization(ResolvedType aType)

Determine whether or not this pointcut matches the static initialization of the given class.

Parameters
aType:ResolvedType

the class being statically initialized

Returns:ShadowMatch

a ShadowMatch indicating whether the pointcut always, sometimes, or never matchs join points representing the static initialization of the given type

mayNeedDynamicTestback to summary
public boolean mayNeedDynamicTest()

Returns true iff this pointcut contains any expression that might necessitate a dynamic test at some join point (e.g. args)

setMatchingContextback to summary
public void setMatchingContext(MatchingContext aMatchContext)

Set the matching context to be used for subsequent calls to match.

See Also
MatchingContext