Package com.sun.codemodel
Class JCase
- java.lang.Object
-
- com.sun.codemodel.JCase
-
- All Implemented Interfaces:
JStatement
public final class JCase extends java.lang.Object implements JStatement
Case statement
-
-
Field Summary
Fields Modifier and Type Field Description private JBlock
body
JBlock of statements which makes up body of this While statementprivate boolean
isDefaultCase
is this a regular case statement or a default case statement?private JExpression
label
label part of the case statement
-
Constructor Summary
Constructors Constructor Description JCase(JExpression label)
Construct a case statementJCase(JExpression label, boolean isDefaultCase)
Construct a case statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JBlock
body()
JExpression
label()
void
state(JFormatter f)
-
-
-
Field Detail
-
label
private JExpression label
label part of the case statement
-
body
private JBlock body
JBlock of statements which makes up body of this While statement
-
isDefaultCase
private boolean isDefaultCase
is this a regular case statement or a default case statement?
-
-
Constructor Detail
-
JCase
JCase(JExpression label)
Construct a case statement
-
JCase
JCase(JExpression label, boolean isDefaultCase)
Construct a case statement. If isDefaultCase is true, then label should be null since default cases don't have a label.
-
-
Method Detail
-
label
public JExpression label()
-
body
public JBlock body()
-
state
public void state(JFormatter f)
- Specified by:
state
in interfaceJStatement
-
-