public class CtSwitchExpressionImpl<T,S> extends CtExpressionImpl<T> implements CtSwitchExpression<T,S>
ERROR_MESSAGE_TO_STRING, factory, LOGGER, parent
Constructor and Description |
---|
CtSwitchExpressionImpl() |
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;
|
CtSwitchExpression<T,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.
|
addTypeCast, getType, getTypeCasts, S, setType, setTypeCasts
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
addTypeCast, getTypeCasts, setTypeCasts
partiallyEvaluate
getType, setType
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
S
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 CtSwitchExpression<T,S> clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtCodeElement
clone
in interface CtExpression<T>
clone
in interface CtSwitchExpression<T,S>
clone
in interface CtElement
clone
in class CtExpressionImpl<T>
Copyright © 2007–2021 Inria. All rights reserved.