org.aspectj.weaver.internal.tools
Class StandardPointcutExpressionImpl

java.lang.Object
  extended by org.aspectj.weaver.internal.tools.StandardPointcutExpressionImpl
All Implemented Interfaces:
StandardPointcutExpression

public class StandardPointcutExpressionImpl
extends java.lang.Object
implements StandardPointcutExpression

Map from weaver.tools interface to internal Pointcut implementation...


Nested Class Summary
static class StandardPointcutExpressionImpl.Handler
           
 
Constructor Summary
StandardPointcutExpressionImpl(Pointcut pointcut, java.lang.String expression, PointcutParameter[] params, World inWorld)
           
 
Method Summary
 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 matchesConstructorExecution(java.lang.reflect.Constructor aConstructor)
           
 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.
 ShadowMatch matchesMethodExecution(ResolvedMember aMethod)
          Determine whether or not this pointcut matches the execution of a given method.
 ShadowMatch matchesStaticInitialization(ResolvedType aType)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardPointcutExpressionImpl

public StandardPointcutExpressionImpl(Pointcut pointcut,
                                      java.lang.String expression,
                                      PointcutParameter[] params,
                                      World inWorld)
Method Detail

getUnderlyingPointcut

public Pointcut getUnderlyingPointcut()

setMatchingContext

public void setMatchingContext(MatchingContext aMatchContext)
Description copied from interface: StandardPointcutExpression
Set the matching context to be used for subsequent calls to match.

Specified by:
setMatchingContext in interface StandardPointcutExpression
See Also:
MatchingContext

couldMatchJoinPointsInType

public boolean couldMatchJoinPointsInType(java.lang.Class aClass)
Description copied from interface: StandardPointcutExpression
Determine whether or not this pointcut could ever match a join point in the given class.

Specified by:
couldMatchJoinPointsInType in interface StandardPointcutExpression
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: StandardPointcutExpression
Returns true iff this pointcut contains any expression that might necessitate a dynamic test at some join point (e.g. args)

Specified by:
mayNeedDynamicTest in interface StandardPointcutExpression

matchesMethodExecution

public ShadowMatch matchesMethodExecution(ResolvedMember aMethod)
Description copied from interface: StandardPointcutExpression
Determine whether or not this pointcut matches the execution of a given method.

Specified by:
matchesMethodExecution in interface StandardPointcutExpression
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

public ShadowMatch matchesConstructorExecution(java.lang.reflect.Constructor aConstructor)

matchesStaticInitialization

public ShadowMatch matchesStaticInitialization(ResolvedType aType)
Description copied from interface: StandardPointcutExpression
Determine whether or not this pointcut matches the static initialization of the given class.

Specified by:
matchesStaticInitialization in interface StandardPointcutExpression
Returns:
a ShadowMatch indicating whether the pointcut always, sometimes, or never matchs join points representing the static initialization of the given type

matchesMethodCall

public ShadowMatch matchesMethodCall(ResolvedMember aMethod,
                                     ResolvedMember withinCode)
Description copied from interface: StandardPointcutExpression
Determine 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:
matchesMethodCall in interface StandardPointcutExpression
Parameters:
aMethod - the method being called
withinCode - 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.

getPointcutExpression

public java.lang.String getPointcutExpression()
Description copied from interface: StandardPointcutExpression
Return a string representation of this pointcut expression.

Specified by:
getPointcutExpression in interface StandardPointcutExpression