Package com.sun.codemodel
Class JCase
java.lang.Object
com.sun.codemodel.JCase
- All Implemented Interfaces:
JStatement
Case statement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JBlock
JBlock of statements which makes up body of this While statementprivate boolean
is this a regular case statement or a default case statement?private JExpression
label part of the case statement -
Constructor Summary
ConstructorsConstructorDescriptionJCase
(JExpression label) Construct a case statementJCase
(JExpression label, boolean isDefaultCase) Construct a case statement. -
Method Summary
-
Field Details
-
label
label part of the case statement -
body
JBlock of statements which makes up body of this While statement -
isDefaultCase
private boolean isDefaultCaseis this a regular case statement or a default case statement?
-
-
Constructor Details
-
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 Details
-
label
-
body
-
state
- Specified by:
state
in interfaceJStatement
-