public class JBlock extends JStatement
JStatements
.Constructor and Description |
---|
JBlock(SourceInfo info) |
Modifier and Type | Method and Description |
---|---|
void |
addStmt(int index,
JStatement toAdd)
Insert a statement into this block.
|
void |
addStmt(JStatement toAdd)
Add a statement to the end of this block.
|
void |
addStmts(int index,
List<JStatement> toAdd)
Insert a statements into this block.
|
void |
addStmts(List<JStatement> toAdd)
Add statements to the end of this block.
|
void |
clear() |
List<JStatement> |
getStatements()
Return the statements in this block.
|
void |
removeStmt(int index)
Removes the statement from this block at the specified index.
|
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
boolean |
unconditionalControlBreak() |
getSourceInfo, setSourceInfo, toSource, toString
public JBlock(SourceInfo info)
public void addStmt(int index, JStatement toAdd)
public void addStmt(JStatement toAdd)
public void addStmts(int index, List<JStatement> toAdd)
public void addStmts(List<JStatement> toAdd)
public void clear()
public List<JStatement> getStatements()
public void removeStmt(int index)
public void traverse(JVisitor visitor, Context ctx)
JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalpublic boolean unconditionalControlBreak()
unconditionalControlBreak
in class JStatement
Copyright © 2018. All rights reserved.