Example usage for org.aspectj.weaver.patterns IfPointcut makeIfTruePointcut

List of usage examples for org.aspectj.weaver.patterns IfPointcut makeIfTruePointcut

Introduction

In this page you can find the example usage for org.aspectj.weaver.patterns IfPointcut makeIfTruePointcut.

Prototype

public static IfPointcut makeIfTruePointcut(State state) 

Source Link

Usage

From source file:org.caesarj.compiler.aspectj.CaesarWrapperPatternParser.java

License:Open Source License

/**
 * /*ww w.ja va 2 s .c  o  m*/
 * @return
 */
private CaesarPointcutWrapper parseIfPointcut() {
    String kind = parseIdentifier();
    eat("(");
    CaesarPointcutWrapper w = null;
    if (maybeEatIdentifier("true")) {
        w = new CaesarPointcutWrapper(IfPointcut.makeIfTruePointcut(Pointcut.SYMBOLIC));
    }
    if (maybeEatIdentifier("false")) {
        w = new CaesarPointcutWrapper(IfPointcut.makeIfFalsePointcut(Pointcut.SYMBOLIC));
    }
    eat(")");
    if (w == null)
        throw new ParserException("If pointcuts currently accept only 'true' or 'false' as values",
                tokenSource.peek());

    return w;
}