public class BlockBuilderImpl<T> extends Object implements BlockBuilder<T>
Modifier and Type | Field and Description |
---|---|
protected BlockStatement |
blockStatement |
protected BuildCallback<T> |
callback |
Constructor and Description |
---|
BlockBuilderImpl() |
BlockBuilderImpl(BlockStatement blockStatement,
BuildCallback<T> callback) |
BlockBuilderImpl(BuildCallback<T> callback) |
Modifier and Type | Method and Description |
---|---|
BlockBuilder<T> |
_(InnerClass innerClass)
|
BlockBuilder<T> |
_(Statement stmt)
|
BlockBuilder<T> |
append(InnerClass innerClass) |
BlockBuilder<T> |
append(Statement statement) |
BlockBuilder<T> |
appendAll(Collection<Statement> stmt) |
void |
clear() |
T |
finish() |
void |
insertBefore(InnerClass innerClass) |
void |
insertBefore(Statement stmt) |
Iterator<Statement> |
iterator() |
Statement |
peek()
Show the last statement in the block.
|
List<Statement> |
splitFrom(Statement statement)
Return a list of statements from the specified statement (inclusive), and remove all of the returned statements
from the underlying builder.
|
protected final BlockStatement blockStatement
protected final BuildCallback<T> callback
public BlockBuilderImpl()
public BlockBuilderImpl(BuildCallback<T> callback)
public BlockBuilderImpl(BlockStatement blockStatement, BuildCallback<T> callback)
public void insertBefore(Statement stmt)
insertBefore
in interface BlockBuilder<T>
public void insertBefore(InnerClass innerClass)
insertBefore
in interface BlockBuilder<T>
public BlockBuilder<T> append(Statement statement)
append
in interface BlockBuilder<T>
public BlockBuilder<T> appendAll(Collection<Statement> stmt)
appendAll
in interface BlockBuilder<T>
public BlockBuilder<T> append(InnerClass innerClass)
append
in interface BlockBuilder<T>
public BlockBuilder<T> _(Statement stmt)
BlockBuilder
_
in interface BlockBuilder<T>
stmt
- the statement to add to the blockpublic BlockBuilder<T> _(InnerClass innerClass)
BlockBuilder
_
in interface BlockBuilder<T>
innerClass
- the statement to add to the blockpublic List<Statement> splitFrom(Statement statement)
BlockBuilder
splitFrom
in interface BlockBuilder<T>
statement
- the statement to split from.public Statement peek()
BlockBuilder
peek
in interface BlockBuilder<T>
public T finish()
finish
in interface Finishable<T>
public void clear()
clear
in interface BlockBuilder<T>
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.