public class CtSwitchImpl<S> extends CtStatementImpl implements CtSwitch<S>
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parent
Constructor and Description |
---|
CtSwitchImpl() |
Modifier and Type | Method and Description |
---|---|
void |
accept(CtVisitor visitor)
Accepts a visitor
|
<T extends CtAbstractSwitch<S>> |
addCase(CtCase<? super S> c)
Adds a case;
|
CtSwitch<S> |
clone()
Clone the element which calls this method in a new object.
|
java.util.List<CtCase<? super S>> |
getCases()
Gets the list of cases defined for this switch.
|
CtExpression<S> |
getSelector()
Gets the selector.
|
boolean |
removeCase(CtCase<? super S> c)
Removes a case;
|
<T extends CtAbstractSwitch<S>> |
setCases(java.util.List<CtCase<? super S>> cases)
Sets the list of cases defined for this switch.
|
<T extends CtAbstractSwitch<S>> |
setSelector(CtExpression<S> selector)
Sets the selector.
|
getLabel, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, setLabel
partiallyEvaluate
addAnnotation, addComment, asIterable, comment, delete, descendantIterator, emptyList, emptySet, equals, filterChildren, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getFactory, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hashCode, hasParent, isImplicit, isParentInitialized, map, map, prettyprint, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setFactory, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, toStringDebug, unmodifiableList, updateAllParentsBelow
finalize, getClass, notify, notifyAll, wait, wait, wait
comment, getLabel, insertAfter, insertAfter, insertBefore, insertBefore, setLabel
partiallyEvaluate
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getOriginalSourceFragment, 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
filterChildren, map, map
public void accept(CtVisitor visitor)
CtVisitable
accept
in interface CtVisitable
public java.util.List<CtCase<? super S>> getCases()
CtAbstractSwitch
getCases
in interface CtAbstractSwitch<S>
public CtExpression<S> getSelector()
CtAbstractSwitch
char
,
byte
, short
, int
,
Character
, Byte
, Short
,
Integer
, or an enum
typegetSelector
in interface CtAbstractSwitch<S>
public <T extends CtAbstractSwitch<S>> T setCases(java.util.List<CtCase<? super S>> cases)
CtAbstractSwitch
setCases
in interface CtAbstractSwitch<S>
public <T extends CtAbstractSwitch<S>> T setSelector(CtExpression<S> selector)
CtAbstractSwitch
char
,
byte
, short
, int
,
Character
, Byte
, Short
,
Integer
, or an enum
typesetSelector
in interface CtAbstractSwitch<S>
public <T extends CtAbstractSwitch<S>> T addCase(CtCase<? super S> c)
CtAbstractSwitch
addCase
in interface CtAbstractSwitch<S>
public boolean removeCase(CtCase<? super S> c)
CtAbstractSwitch
removeCase
in interface CtAbstractSwitch<S>
public CtSwitch<S> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtCodeElement
clone
in interface CtStatement
clone
in interface CtSwitch<S>
clone
in interface CtElement
clone
in class CtStatementImpl
Copyright © 2007–2021 Inria. All rights reserved.