Class org.as2lib.aop.pointcut.OrPointcut

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

Implemented Interfaces

CompositePointcut

Description

OrPointcut combines multiple pointcuts with a logical OR. This means that this pointcut captures a given join point if at least one of its contained pointcuts captures 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 OrPointcut()

captures()

Inherited from AbstractCompositePointcut

addPointcut(), getPointcuts()

Inherited from BasicClass

toString()

Constructor Detail

OrPointcut

public function OrPointcut(pointcut:String)

Constructs a new OrPointcut instance.

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

Parameters

pointcutthe string representation of this or pointcut

Method Detail

captures

public function captures(joinPoint:JoinPoint):Boolean

Checks whether this pointcut captures the given joinPoint. The joinPoint is captured if at least one sub-pointcut of this pointcut captures it. false will be returned if:

  • The passed-in joinPoint is null or undefined.
  • Not even one sub-pointcut captures the given joinPoint.
  • 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