Package relaxngcc.codedom
Class CDBlock
java.lang.Object
relaxngcc.codedom.CDBlock
- All Implemented Interfaces:
CDStatement
- Author:
- Daisuke OKAJIMA simple collection of CDStatement objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_if
(CDExpression exp) void
_return
(CDExpression val) Adds a new return statement.void
void
add
(CDStatement s) assign
(CDExpression lhs, CDExpression rhs) Adds a new assignment.Adds a new variable declaration.decl
(CDType type, String name, CDExpression init) insertDecl
(CDType type, String name) Declares a new variable at the beginning of the block.invoke
(CDExpression obj, String method) Adds a new method invocation.int
size()
void
state
(CDFormatter f) Prints itself as a statement.
-
Constructor Details
-
CDBlock
public CDBlock() -
CDBlock
-
-
Method Details
-
add
-
add
-
_if
-
invoke
Adds a new method invocation. -
invoke
-
decl
Adds a new variable declaration. -
decl
-
insertDecl
Declares a new variable at the beginning of the block. -
assign
Adds a new assignment. -
_return
Adds a new return statement. -
size
public int size() -
state
Description copied from interface:CDStatement
Prints itself as a statement.- Specified by:
state
in interfaceCDStatement
- Throws:
IOException
-