Example usage for org.eclipse.jdt.core.dom AST newDoStatement

List of usage examples for org.eclipse.jdt.core.dom AST newDoStatement

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom AST newDoStatement.

Prototype

public DoStatement newDoStatement() 

Source Link

Document

Creates a new unparented do statement node owned by this AST.

Usage

From source file:org.jboss.forge.roaster.model.impl.statements.DoWhileStatementImpl.java

License:Open Source License

@Override
public DoStatement materialize(AST ast) {
    if (rep != null) {
        return rep;
    }//from  ww  w  .ja  v  a 2  s  .c  o m
    rep = ast.newDoStatement();

    if (body != null) {
        rep.setBody(wireAndGetStatement(body, this, ast));
    }
    if (condition != null) {
        rep.setExpression(wireAndGetExpression(condition, this, ast));
    }
    return rep;
}