Package org.jboss.jdeparser
Class ImplJSwitch
java.lang.Object
org.jboss.jdeparser.BasicJCommentable
org.jboss.jdeparser.ImplJSwitch
- All Implemented Interfaces:
BlockContent
,JCommentable
,JStatement
,JSwitch
,Writable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DefaultJBlock
private final ArrayList
<CaseJBlock> private final JExpr
private final BasicJBlock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a switch case for anenum
constant.Add a switch case._default()
Add the default block.private <T extends CaseJBlock>
Tadd
(T item) (package private) ArrayList
<CaseJBlock> getCases()
(package private) DefaultJBlock
(package private) JExpr
(package private) BasicJBlock
void
write
(SourceFileWriter writer) Methods inherited from class org.jboss.jdeparser.BasicJCommentable
blockComment, lineComment, writeComments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
-
Field Details
-
parent
-
expr
-
cases
-
_default
-
-
Constructor Details
-
ImplJSwitch
ImplJSwitch(BasicJBlock parent, JExpr expr)
-
-
Method Details
-
add
-
_case
Description copied from interface:JSwitch
Add a switch case. -
_case
Description copied from interface:JSwitch
Add a switch case for anenum
constant. -
_default
Description copied from interface:JSwitch
Add the default block. -
getExpression
JExpr getExpression() -
getParent
BasicJBlock getParent() -
getCases
ArrayList<CaseJBlock> getCases() -
getDefault
DefaultJBlock getDefault() -
write
- Specified by:
write
in interfaceWritable
- Throws:
IOException
-