public class PointcutExpressionImpl extends java.lang.Object implements PointcutExpression
Modifier and Type | Class and Description |
---|---|
static class |
PointcutExpressionImpl.Handler |
Constructor and Description |
---|
PointcutExpressionImpl(Pointcut pointcut,
java.lang.String expression,
PointcutParameter[] params,
World inWorld) |
Modifier and Type | Method and Description |
---|---|
boolean |
couldMatchJoinPointsInType(java.lang.Class aClass)
Determine whether or not this pointcut could ever match a join point in the given class.
|
java.lang.String |
getPointcutExpression()
Return a string representation of this pointcut expression.
|
Pointcut |
getUnderlyingPointcut() |
ShadowMatch |
matchesAdviceExecution(java.lang.reflect.Method aMethod)
Determine whether or not this pointcut matches the execution of a given piece of advice.
|
ShadowMatch |
matchesConstructorCall(java.lang.reflect.Constructor aConstructor,
java.lang.Class callerType)
Determine whether or not this pointcut matches a method call to the given constructor, made outside
of the scope of any method or constructor, but within the callerType.
|
ShadowMatch |
matchesConstructorCall(java.lang.reflect.Constructor aConstructor,
java.lang.reflect.Member withinCode)
Determine whether or not this pointcut matches a method call to the given constructor, made during
the execution of the given method or constructor.
|
ShadowMatch |
matchesConstructorExecution(java.lang.reflect.Constructor aConstructor)
Determine whether or not this pointcut matches the execution of a given constructor.
|
ShadowMatch |
matchesFieldGet(java.lang.reflect.Field aField,
java.lang.Class withinType)
Determine whether or not this pointcut matches a get of the given field outside of the
scope of any method or constructor, but within the given type (for example, during
static initialization).
|
ShadowMatch |
matchesFieldGet(java.lang.reflect.Field aField,
java.lang.reflect.Member withinCode)
Determine whether or not this pointcut matches a get of the given field from within the given
method or constructor.
|
ShadowMatch |
matchesFieldSet(java.lang.reflect.Field aField,
java.lang.Class withinType)
Determine whether or not this pointcut matches a set of the given field outside of the
scope of any method or constructor, but within the given type (for example, during
static initialization).
|
ShadowMatch |
matchesFieldSet(java.lang.reflect.Field aField,
java.lang.reflect.Member withinCode)
Determine whether or not this pointcut matches a set of the given field from within the given
method or constructor.
|
ShadowMatch |
matchesHandler(java.lang.Class exceptionType,
java.lang.Class handlingType)
Determine whether or not this pointcut matches the execution of a given exception
handler outside of the scope of any method or constructor, but within the handling type.
|
ShadowMatch |
matchesHandler(java.lang.Class exceptionType,
java.lang.reflect.Member withinCode)
Determine whether or not this pointcut matches the execution of a given exception
handler within the given method or constructor
|
ShadowMatch |
matchesInitialization(java.lang.reflect.Constructor aConstructor)
Determine whether or not this pointcut matches the initialization of an
object initiated by a call to the given constructor.
|
ShadowMatch |
matchesMethodCall(java.lang.reflect.Method aMethod,
java.lang.Class callerType)
Determine whether or not this pointcut matches a method call to the given method, made outside
of the scope of any method or constructor, but within the callerType (for example, during
static initialization of the type).
|
ShadowMatch |
matchesMethodCall(java.lang.reflect.Method aMethod,
java.lang.reflect.Member 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.
|
ShadowMatch |
matchesMethodExecution(java.lang.reflect.Method aMethod)
Determine whether or not this pointcut matches the execution of a given method.
|
ShadowMatch |
matchesPreInitialization(java.lang.reflect.Constructor aConstructor)
Determine whether or not this pointcut matches the pre-initialization of an
object initiated by a call to the given constructor.
|
ShadowMatch |
matchesStaticInitialization(java.lang.Class aClass)
Determine whether or not this pointcut matches the static initialization
of the given class.
|
boolean |
mayNeedDynamicTest()
Returns true iff this pointcut contains any expression that might necessitate a dynamic test
at some join point (e.g.
|
void |
setMatchingContext(MatchingContext aMatchContext)
Set the matching context to be used for
subsequent calls to match.
|
public PointcutExpressionImpl(Pointcut pointcut, java.lang.String expression, PointcutParameter[] params, World inWorld)
public Pointcut getUnderlyingPointcut()
public void setMatchingContext(MatchingContext aMatchContext)
PointcutExpression
setMatchingContext
in interface PointcutExpression
MatchingContext
public boolean couldMatchJoinPointsInType(java.lang.Class aClass)
PointcutExpression
couldMatchJoinPointsInType
in interface PointcutExpression
aClass
- the candidate classpublic boolean mayNeedDynamicTest()
PointcutExpression
mayNeedDynamicTest
in interface PointcutExpression
public ShadowMatch matchesMethodExecution(java.lang.reflect.Method aMethod)
PointcutExpression
matchesMethodExecution
in interface PointcutExpression
aMethod
- the method being executedpublic ShadowMatch matchesConstructorExecution(java.lang.reflect.Constructor aConstructor)
PointcutExpression
matchesConstructorExecution
in interface PointcutExpression
aConstructor
- the constructor being executedpublic ShadowMatch matchesStaticInitialization(java.lang.Class aClass)
PointcutExpression
matchesStaticInitialization
in interface PointcutExpression
aClass
- the class being statically initializedpublic ShadowMatch matchesAdviceExecution(java.lang.reflect.Method aMethod)
PointcutExpression
matchesAdviceExecution
in interface PointcutExpression
aMethod
- a method representing the advice being executedpublic ShadowMatch matchesInitialization(java.lang.reflect.Constructor aConstructor)
PointcutExpression
matchesInitialization
in interface PointcutExpression
aConstructor
- the constructor initiating the initializationpublic ShadowMatch matchesPreInitialization(java.lang.reflect.Constructor aConstructor)
PointcutExpression
matchesPreInitialization
in interface PointcutExpression
aConstructor
- the constructor initiating the initializationpublic ShadowMatch matchesMethodCall(java.lang.reflect.Method aMethod, java.lang.reflect.Member withinCode)
PointcutExpression
matchesMethodCall
in interface PointcutExpression
aMethod
- the method being calledwithinCode
- the Method or Constructor from within which the call is madepublic ShadowMatch matchesMethodCall(java.lang.reflect.Method aMethod, java.lang.Class callerType)
PointcutExpression
matchesMethodCall
in interface PointcutExpression
aMethod
- the method being calledcallerType
- the declared type of the callerpublic ShadowMatch matchesConstructorCall(java.lang.reflect.Constructor aConstructor, java.lang.Class callerType)
PointcutExpression
matchesConstructorCall
in interface PointcutExpression
aConstructor
- the cosstructor being calledcallerType
- the declared type of the callerpublic ShadowMatch matchesConstructorCall(java.lang.reflect.Constructor aConstructor, java.lang.reflect.Member withinCode)
PointcutExpression
matchesConstructorCall
in interface PointcutExpression
aConstructor
- the constructor being calledwithinCode
- the Method or Constructor from within which the call is madepublic ShadowMatch matchesHandler(java.lang.Class exceptionType, java.lang.Class handlingType)
PointcutExpression
matchesHandler
in interface PointcutExpression
exceptionType
- the static type of the exception being handledhandlingType
- the type in which the handler block is executingpublic ShadowMatch matchesHandler(java.lang.Class exceptionType, java.lang.reflect.Member withinCode)
PointcutExpression
matchesHandler
in interface PointcutExpression
exceptionType
- the static type of the exception being handledwithinCode
- the method or constructor in which the catch block is declaredpublic ShadowMatch matchesFieldGet(java.lang.reflect.Field aField, java.lang.Class withinType)
PointcutExpression
matchesFieldGet
in interface PointcutExpression
aField
- the field being accessedwithinType
- the type owning the call sitepublic ShadowMatch matchesFieldGet(java.lang.reflect.Field aField, java.lang.reflect.Member withinCode)
PointcutExpression
matchesFieldGet
in interface PointcutExpression
aField
- the field being updatedwithinCode
- the Method or Constructor owning the call sitepublic ShadowMatch matchesFieldSet(java.lang.reflect.Field aField, java.lang.Class withinType)
PointcutExpression
matchesFieldSet
in interface PointcutExpression
aField
- the field being updatedwithinType
- the type owning the call sitepublic ShadowMatch matchesFieldSet(java.lang.reflect.Field aField, java.lang.reflect.Member withinCode)
PointcutExpression
matchesFieldSet
in interface PointcutExpression
aField
- the field being updatedwithinCode
- the Method or Constructor owning the call sitepublic java.lang.String getPointcutExpression()
PointcutExpression
getPointcutExpression
in interface PointcutExpression