org.eclipse.xtend.backend.aop
Class AroundAdvice

java.lang.Object
  extended by org.eclipse.xtend.backend.aop.AroundAdvice

public final class AroundAdvice
extends java.lang.Object

Author:
Arno Haase (http://www.haase-consulting.com)

Constructor Summary
AroundAdvice(ExpressionBase body, Pointcut pointcut, boolean isCacheable)
           
 
Method Summary
 java.lang.Object evaluate(ExecutionContext ctx, AdviceScopeCounter scopeCounter, ThisJoinPoint thisJoinPoint, ThisJoinPointStaticPart thisJoinPointStaticPart)
          actually evaluates the advice, regardless of caching - that is context sensitive and must be taken care of by callers
 ExpressionBase getBody()
           
 Pointcut getPointcut()
           
 boolean isCacheable()
          This flag determines whether the advice is cacheable.
 void setFunctionDefContext(FunctionDefContext fdc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AroundAdvice

public AroundAdvice(ExpressionBase body,
                    Pointcut pointcut,
                    boolean isCacheable)
Parameters:
body - contains the body of this advice
pointcut - contains the pointcut that guards this advice
isCacheable - This flag marks the advice as "cacheable". This means that the result of its execution will be cached iff all advice wrapped by it, and the originally wrapped function, are cacheable or cached, respectively.
Method Detail

getBody

public ExpressionBase getBody()

evaluate

public java.lang.Object evaluate(ExecutionContext ctx,
                                 AdviceScopeCounter scopeCounter,
                                 ThisJoinPoint thisJoinPoint,
                                 ThisJoinPointStaticPart thisJoinPointStaticPart)
actually evaluates the advice, regardless of caching - that is context sensitive and must be taken care of by callers


setFunctionDefContext

public void setFunctionDefContext(FunctionDefContext fdc)

getPointcut

public Pointcut getPointcut()

isCacheable

public boolean isCacheable()
This flag determines whether the advice is cacheable. It is intentionally kept separate from the "cached" flag of the implementing function because of the different semantics.