Package com.sun.codemodel
Class JConditional
java.lang.Object
com.sun.codemodel.JConditional
- All Implemented Interfaces:
JStatement
If statement, with optional else clause
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_else()
Create a block to be executed by "else" branch_elseif
(JExpression boolExp) Creates ..._then()
Return the block to be excuted by the "then" branchvoid
state
(JFormatter f)
-
Field Details
-
test
JExpression to test to determine branching -
_then
JBlock of statements for "then" clause -
_else
JBlock of statements for optional "else" clause
-
-
Constructor Details
-
JConditional
JConditional(JExpression test) Constructor- Parameters:
test
- JExpression which will determine branching
-
-
Method Details
-
_then
Return the block to be excuted by the "then" branch- Returns:
- Then block
-
_else
Create a block to be executed by "else" branch- Returns:
- Newly generated else block
-
_elseif
Creates ... else if(...) ... code. -
state
- Specified by:
state
in interfaceJStatement
-