Class PointcutExpressionImpl
java.lang.Object
org.aspectj.weaver.internal.tools.PointcutExpressionImpl
- All Implemented Interfaces:
PointcutExpression
Map from weaver.tools interface to internal Pointcut implementation...
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPointcutExpressionImpl(Pointcut pointcut, String expression, PointcutParameter[] params, World inWorld) -
Method Summary
Modifier and TypeMethodDescriptionbooleancouldMatchJoinPointsInType(Class aClass) Determine whether or not this pointcut could ever match a join point in the given class.Return a string representation of this pointcut expression.matchesAdviceExecution(Method aMethod) Determine whether or not this pointcut matches the execution of a given piece of advice.matchesConstructorCall(Constructor aConstructor, 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.matchesConstructorCall(Constructor aConstructor, 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.matchesConstructorExecution(Constructor aConstructor) Determine whether or not this pointcut matches the execution of a given constructor.matchesFieldGet(Field aField, 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).matchesFieldGet(Field aField, Member withinCode) Determine whether or not this pointcut matches a get of the given field from within the given method or constructor.matchesFieldSet(Field aField, 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).matchesFieldSet(Field aField, Member withinCode) Determine whether or not this pointcut matches a set of the given field from within the given method or constructor.matchesHandler(Class exceptionType, 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.matchesHandler(Class exceptionType, Member withinCode) Determine whether or not this pointcut matches the execution of a given exception handler within the given method or constructormatchesInitialization(Constructor aConstructor) Determine whether or not this pointcut matches the initialization of an object initiated by a call to the given constructor.matchesMethodCall(Method aMethod, 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).matchesMethodCall(Method aMethod, 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.matchesMethodExecution(Method aMethod) Determine whether or not this pointcut matches the execution of a given method.matchesPreInitialization(Constructor aConstructor) Determine whether or not this pointcut matches the pre-initialization of an object initiated by a call to the given constructor.matchesStaticInitialization(Class aClass) Determine whether or not this pointcut matches the static initialization of the given class.booleanReturns true iff this pointcut contains any expression that might necessitate a dynamic test at some join point (e.g. args)voidsetMatchingContext(MatchingContext aMatchContext) Set the matching context to be used for subsequent calls to match.
-
Constructor Details
-
PointcutExpressionImpl
public PointcutExpressionImpl(Pointcut pointcut, String expression, PointcutParameter[] params, World inWorld)
-
-
Method Details
-
getUnderlyingPointcut
-
setMatchingContext
Description copied from interface:PointcutExpressionSet the matching context to be used for subsequent calls to match.- Specified by:
setMatchingContextin interfacePointcutExpression- See Also:
-
couldMatchJoinPointsInType
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut could ever match a join point in the given class.- Specified by:
couldMatchJoinPointsInTypein interfacePointcutExpression- Parameters:
aClass- the candidate class- Returns:
- true iff this pointcut may match a join point within(aClass), and false otherwise
-
mayNeedDynamicTest
public boolean mayNeedDynamicTest()Description copied from interface:PointcutExpressionReturns true iff this pointcut contains any expression that might necessitate a dynamic test at some join point (e.g. args)- Specified by:
mayNeedDynamicTestin interfacePointcutExpression
-
matchesMethodExecution
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches the execution of a given method.- Specified by:
matchesMethodExecutionin interfacePointcutExpression- Parameters:
aMethod- the method being executed- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing the execution of the method.
-
matchesConstructorExecution
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches the execution of a given constructor.- Specified by:
matchesConstructorExecutionin interfacePointcutExpression- Parameters:
aConstructor- the constructor being executed- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing the execution of the constructor.
-
matchesStaticInitialization
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches the static initialization of the given class.- Specified by:
matchesStaticInitializationin interfacePointcutExpression- Parameters:
aClass- the class being statically initialized- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matchs join points representing the static initialization of the given type
-
matchesAdviceExecution
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches the execution of a given piece of advice.- Specified by:
matchesAdviceExecutionin interfacePointcutExpression- Parameters:
aMethod- a method representing the advice being executed- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing the execution of the advice.
-
matchesInitialization
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches the initialization of an object initiated by a call to the given constructor.- Specified by:
matchesInitializationin interfacePointcutExpression- Parameters:
aConstructor- the constructor initiating the initialization- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing initialization via the given constructor.
-
matchesPreInitialization
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches the pre-initialization of an object initiated by a call to the given constructor.- Specified by:
matchesPreInitializationin interfacePointcutExpression- Parameters:
aConstructor- the constructor initiating the initialization- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing pre-initialization via the given constructor.
-
matchesMethodCall
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches a method call to the given method, made during the execution of the given method or constructor.- Specified by:
matchesMethodCallin interfacePointcutExpression- Parameters:
aMethod- the method being calledwithinCode- the Method or Constructor from within which the call is made- 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
Description copied from interface:PointcutExpressionDetermine 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).- Specified by:
matchesMethodCallin interfacePointcutExpression- Parameters:
aMethod- the method being calledcallerType- the declared type of the caller- 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.
-
matchesConstructorCall
Description copied from interface:PointcutExpressionDetermine 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.- Specified by:
matchesConstructorCallin interfacePointcutExpression- Parameters:
aConstructor- the cosstructor being calledcallerType- the declared type of the caller- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing a call to this constructor during the execution of the given member.
-
matchesConstructorCall
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches a method call to the given constructor, made during the execution of the given method or constructor.- Specified by:
matchesConstructorCallin interfacePointcutExpression- Parameters:
aConstructor- the constructor being calledwithinCode- the Method or Constructor from within which the call is made- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing a call to this constructor during the execution of the given member.
-
matchesHandler
Description copied from interface:PointcutExpressionDetermine 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.- Specified by:
matchesHandlerin interfacePointcutExpression- Parameters:
exceptionType- the static type of the exception being handledhandlingType- the type in which the handler block is executing- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing the handling of the given exception
-
matchesHandler
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches the execution of a given exception handler within the given method or constructor- Specified by:
matchesHandlerin interfacePointcutExpression- Parameters:
exceptionType- the static type of the exception being handledwithinCode- the method or constructor in which the catch block is declared- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches join points representing the handling of the given exception
-
matchesFieldGet
Description copied from interface:PointcutExpressionDetermine 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).- Specified by:
matchesFieldGetin interfacePointcutExpression- Parameters:
aField- the field being accessedwithinType- the type owning the call site- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches field get join points for the given field and call site.
-
matchesFieldGet
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches a get of the given field from within the given method or constructor.- Specified by:
matchesFieldGetin interfacePointcutExpression- Parameters:
aField- the field being updatedwithinCode- the Method or Constructor owning the call site- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches field get join points for the given field and call site.
-
matchesFieldSet
Description copied from interface:PointcutExpressionDetermine 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).- Specified by:
matchesFieldSetin interfacePointcutExpression- Parameters:
aField- the field being updatedwithinType- the type owning the call site- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches field set join points for the given field and call site.
-
matchesFieldSet
Description copied from interface:PointcutExpressionDetermine whether or not this pointcut matches a set of the given field from within the given method or constructor.- Specified by:
matchesFieldSetin interfacePointcutExpression- Parameters:
aField- the field being updatedwithinCode- the Method or Constructor owning the call site- Returns:
- a ShadowMatch indicating whether the pointcut always, sometimes, or never matches field set join points for the given field and call site.
-
getPointcutExpression
Description copied from interface:PointcutExpressionReturn a string representation of this pointcut expression.- Specified by:
getPointcutExpressionin interfacePointcutExpression
-