Class org.as2lib.aop.pointcut.AndPointcut

org.as2lib.core.BasicClass
   +--org.as2lib.aop.pointcut.AbstractCompositePointcut
      +--org.as2lib.aop.pointcut.AndPointcut

Implemented Interfaces

CompositePointcut

Description

AndPointcut combines multiple pointcuts with a logical AND. This means that this pointcut captures a given join point if all its contained pointcuts capture the given join point.

This pointcut expects a string representation as parameter on construction. Such a string representation may look something like this: execution(org.as2lib.env.Logger.*) && execution(org.as2lib.reflect.*.*)

Method Index

new AndPointcut()

captures()

Inherited from AbstractCompositePointcut

addPointcut(), getPointcuts()

Inherited from BasicClass

toString()

Constructor Detail

AndPointcut

public function AndPointcut(pointcut:String)

Constructs a new AndPointcut instance.

The string representation is supposed to be a combination of multiple pointcuts where some of them are combined with the && operator.

Parameters

pointcut(optional) the string representation of this and pointcut

Method Detail

captures

public function captures(joinPoint:JoinPoint):Boolean

Checks whether this pointcut captures the given joinPoint. The joinPoint is only captured if all sub-pointcuts of this pointcut capture it. false will be returned if:

  • The passed-in joinPoint is null or undefined.
  • Any of the sub-pointcuts' captures method returns false.
  • There are no pointcuts added.

Parameters

joinPointthe join point to check whether it is captured by this pointcut

Return

true if this pointcut captures the given joinPoint else false