S
- This type must be assignable from the switch typepublic interface CtCase<S> extends CtStatement, CtStatementList
int x = 0; switch(x) { case 1: // <-- case statement System.out.println("foo"); }
CtSwitch
Modifier and Type | Method and Description |
---|---|
CtCase<S> |
clone()
Clone the element which calls this method in a new object.
|
CtExpression<S> |
getCaseExpression()
Gets the case expression.
|
<T extends CtCase<S>> |
setCaseExpression(CtExpression<S> caseExpression)
Sets the case expression.
|
getLabel, insertAfter, insertAfter, insertBefore, insertBefore, setLabel
addStatement, addStatement, getLastStatement, getStatement, getStatements, insertAfter, insertAfter, insertBefore, insertBefore, insertBegin, insertBegin, insertEnd, insertEnd, removeStatement, setStatements
partiallyEvaluate
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, updateAllParentsBelow
getFactory, setFactory
accept
filterChildren, map, map
getOriginalSourceFragment
forEach, iterator, spliterator
CtExpression<S> getCaseExpression()
<T extends CtCase<S>> T setCaseExpression(CtExpression<S> caseExpression)
CtCase<S> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtCodeElement
clone
in interface CtElement
clone
in interface CtStatement
clone
in interface CtStatementList
Copyright © 2007–2019 Inria. All rights reserved.