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

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

Introduction

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

Prototype

public SynchronizedStatement newSynchronizedStatement() 

Source Link

Document

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

Usage

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

License:Open Source License

@Override
public SynchronizedStatement materialize(AST ast) {
    if (synch != null) {
        return synch;
    }/*  ww  w . j av  a  2  s .  co  m*/
    synch = ast.newSynchronizedStatement();

    if (expr != null) {
        synch.setExpression(wireAndGetExpression(expr, this, ast));
    }
    if (body != null) {
        synch.setBody((org.eclipse.jdt.core.dom.Block) wireAndGetStatement(body, this, ast));
    }
    return synch;
}