org.jboss.errai.codegen
Class BlockStatement
java.lang.Object
org.jboss.errai.codegen.AbstractStatement
org.jboss.errai.codegen.BlockStatement
- All Implemented Interfaces:
- Statement
public class BlockStatement
- extends AbstractStatement
Represents a code block (e.g. a loop body).
- Author:
- Christian Sadilek
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_BLOCK
public static final BlockStatement EMPTY_BLOCK
BlockStatement
public BlockStatement(Statement... statements)
addStatement
public BlockStatement addStatement(Statement statement)
addAllStatements
public BlockStatement addAllStatements(Collection<Statement> stmts)
insertBefore
public void insertBefore(Statement statement)
generate
public String generate(Context context)
getStatements
public List<Statement> getStatements()
- Returns a mutable representation of the statements in this block. Changes to the List returned by this
method will be reflected in the state of this method when the code is generated.
- Returns:
- a list representing the underlying set of statements in this block.
isEmpty
public boolean isEmpty()
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.