org.as2lib.core.BasicClass +--org.as2lib.aop.pointcut.KindedPointcut
Pointcut
KindedPointcut
represents any kinded pointcuts. These are for example
execution, set and get access pointcuts.
Kinded pointcuts build upon a join point pattern and a specific join point type. Pre-defined join point types are AbstractJoinPoint#METHOD, AbstractJoinPoint#PROPERTY, AbstractJoinPoint#GET_PROPERTY, AbstractJoinPoint#SET_PROPERTY and AbstractJoinPoint#CONSTRUCTOR. You may combine several join point types with a bitwise or "|" to make this kinded pointcut match all the combined join point types.
The pattern may consist of wildcards. Using wildcards you can capture join points
based on specific characteristics like capture every setter method contained in every
class whose name starts with "Abstract"
in the org.as2lib.env
package
and every sub-package. Such a pattern would look something like this:
org.as2lib.env..Abstract*.set*
You already see two wildcards there: '*' and '..'.
public function KindedPointcut(joinPointPattern:String, matchingJoinPointTypes:Number)
Constructs a new KindedPointcut
instance.
Depending on the join points matches
method a pattern of value
null
or undefined
will cause the captures method to
return true
or false
. Note that the join point implementations
provided by this framework return true
for a null
pattern.
A matching join point type of value null
or undefined
is
interpreted as "any type of join point allowed".
matchingJoinPointTypes
can be either only one type or a bitwise or "|"
combination of several types. It is thus possible to make this kinded pointcut
match more than one join point type.
AbstractJoinPoint.METHOD | AbstractJoinPoint.CONSTRUCTOR
joinPointPattern | the join point pattern |
matchingJoinPointTypes | the types of the join points that match this pointcut |
public function captures(joinPoint:JoinPoint):Boolean
Checks whether the given joinPoint
is captured by this pointcut. This is
normally the case if the join point is of the correct type and the pattern
matches the join point.
false
will be returned if:
null
or undefined
.joinPoint | the join point to check whether it is captured by this pointcut |
true
if the given joinPoint
is captured else false