Example usage for org.eclipse.jdt.internal.compiler.ast AssertStatement AssertStatement

List of usage examples for org.eclipse.jdt.internal.compiler.ast AssertStatement AssertStatement

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast AssertStatement AssertStatement.

Prototype

public AssertStatement(Expression assertExpression, int startPosition) 

Source Link

Usage

From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java

License:Open Source License

protected void consumeSimpleAssertStatement() {
    // AssertStatement ::= 'assert' Expression ';'
    this.expressionLengthPtr--;
    pushOnAstStack(/* ww w. j  a va2s .  c  om*/
            new AssertStatement(this.expressionStack[this.expressionPtr--], this.intStack[this.intPtr--]));
}

From source file:org.nabucco.framework.mda.template.java.extract.statement.JavaAstStatementExtractorVisitor.java

License:Open Source License

@Override
public boolean visit(AssertStatement assertStatement, BlockScope scope) {

    Expression assertExpression = copy(assertStatement.assertExpression, scope);

    AssertStatement assertCopy = new AssertStatement(assertExpression, assertStatement.sourceStart);

    assertCopy.exceptionArgument = copy(assertStatement.exceptionArgument, scope);

    this.statement = assertCopy;

    return false;
}