Package com.sun.codemodel
Class JSwitch
- java.lang.Object
-
- com.sun.codemodel.JSwitch
-
- All Implemented Interfaces:
JStatement
public final class JSwitch extends java.lang.Object implements JStatement
Switch statement
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<JCase>
cases
vector of JCases.private JCase
defaultCase
a single default caseprivate JExpression
test
Test part of switch statement.
-
Constructor Summary
Constructors Constructor Description JSwitch(JExpression test)
Construct a While statment
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JCase
_case(JExpression label)
JCase
_default()
java.util.Iterator<JCase>
cases()
void
state(JFormatter f)
JExpression
test()
-
-
-
Field Detail
-
test
private JExpression test
Test part of switch statement.
-
cases
private java.util.List<JCase> cases
vector of JCases.
-
defaultCase
private JCase defaultCase
a single default case
-
-
Constructor Detail
-
JSwitch
JSwitch(JExpression test)
Construct a While statment
-
-
Method Detail
-
test
public JExpression test()
-
cases
public java.util.Iterator<JCase> cases()
-
_case
public JCase _case(JExpression label)
-
_default
public JCase _default()
-
state
public void state(JFormatter f)
- Specified by:
state
in interfaceJStatement
-
-