class ImplJSwitch extends BasicJCommentable implements JSwitch, BlockContent
Modifier and Type | Field and Description |
---|---|
private DefaultJBlock |
_default |
private java.util.ArrayList<CaseJBlock> |
cases |
private JExpr |
expr |
private BasicJBlock |
parent |
Constructor and Description |
---|
ImplJSwitch(BasicJBlock parent,
JExpr expr) |
Modifier and Type | Method and Description |
---|---|
JBlock |
_case(JExpr expr)
Add a switch case.
|
JBlock |
_case(java.lang.String constName)
Add a switch case for an
enum constant. |
JBlock |
_default()
Add the default block.
|
private <T extends CaseJBlock> |
add(T item) |
(package private) java.util.ArrayList<CaseJBlock> |
getCases() |
(package private) DefaultJBlock |
getDefault() |
(package private) JExpr |
getExpression() |
(package private) BasicJBlock |
getParent() |
void |
write(SourceFileWriter writer) |
blockComment, lineComment, writeComments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
blockComment, lineComment
private final BasicJBlock parent
private final JExpr expr
private final java.util.ArrayList<CaseJBlock> cases
private DefaultJBlock _default
ImplJSwitch(BasicJBlock parent, JExpr expr)
private <T extends CaseJBlock> T add(T item)
public JBlock _case(java.lang.String constName)
JSwitch
enum
constant.JExpr getExpression()
BasicJBlock getParent()
java.util.ArrayList<CaseJBlock> getCases()
DefaultJBlock getDefault()
public void write(SourceFileWriter writer) throws java.io.IOException