public final class SwitchEntryStmt extends Statement implements NodeWithStatements<SwitchEntryStmt>
switch (i) {
case 1:
case 2:
System.out.println(444);
break;
default:
System.out.println(0);
}
This contains three SwitchEntryStmts.
SwitchStmtNode.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversalABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY| Constructor and Description |
|---|
SwitchEntryStmt() |
SwitchEntryStmt(Expression label,
NodeList<Statement> statements) |
SwitchEntryStmt(TokenRange tokenRange,
Expression label,
NodeList<Statement> statements)
This constructor is used by the parser and is considered private.
|
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
SwitchEntryStmt |
asSwitchEntryStmt() |
SwitchEntryStmt |
clone() |
Optional<Expression> |
getLabel() |
SwitchEntryStmtMetaModel |
getMetaModel() |
NodeList<Statement> |
getStatements() |
void |
ifSwitchEntryStmt(Consumer<SwitchEntryStmt> action) |
boolean |
isSwitchEntryStmt() |
boolean |
remove(Node node) |
SwitchEntryStmt |
removeLabel() |
boolean |
replace(Node node,
Node replacementNode) |
SwitchEntryStmt |
setLabel(Expression label)
Sets the label
|
SwitchEntryStmt |
setStatements(NodeList<Statement> statements) |
asAssertStmt, asBlockStmt, asBreakStmt, asContinueStmt, asDoStmt, asEmptyStmt, asExplicitConstructorInvocationStmt, asExpressionStmt, asForeachStmt, asForStmt, asIfStmt, asLabeledStmt, asLocalClassDeclarationStmt, asReturnStmt, asSwitchStmt, asSynchronizedStmt, asThrowStmt, asTryStmt, asUnparsableStmt, asWhileStmt, ifAssertStmt, ifBlockStmt, ifBreakStmt, ifContinueStmt, ifDoStmt, ifEmptyStmt, ifExplicitConstructorInvocationStmt, ifExpressionStmt, ifForeachStmt, ifForStmt, ifIfStmt, ifLabeledStmt, ifLocalClassDeclarationStmt, ifReturnStmt, ifSwitchStmt, ifSynchronizedStmt, ifThrowStmt, ifTryStmt, ifUnparsableStmt, ifWhileStmt, isAssertStmt, isBlockStmt, isBreakStmt, isContinueStmt, isDoStmt, isEmptyStmt, isExplicitConstructorInvocationStmt, isExpressionStmt, isForeachStmt, isForStmt, isIfStmt, isLabeledStmt, isLocalClassDeclarationStmt, isReturnStmt, isSwitchStmt, isSynchronizedStmt, isThrowStmt, isTryStmt, isUnparsableStmt, isWhileStmtaddOrphanComment, containsData, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findParent, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walkfinalize, getClass, notify, notifyAll, wait, wait, waitaddAndGetStatement, addAndGetStatement, addAndGetStatement, addAndGetStatement, addStatement, addStatement, addStatement, addStatement, addStatement, copyStatements, copyStatements, getStatement, isEmpty, setStatementgetAncestorOfTypecontainsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBeforepublic SwitchEntryStmt()
public SwitchEntryStmt(Expression label, NodeList<Statement> statements)
@Generated(value="com.github.javaparser.generator.core.node.MainConstructorGenerator") public SwitchEntryStmt(TokenRange tokenRange, Expression label, NodeList<Statement> statements)
@Generated(value="com.github.javaparser.generator.core.node.AcceptGenerator") public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)@Generated(value="com.github.javaparser.generator.core.node.AcceptGenerator") public <A> void accept(VoidVisitor<A> v, A arg)
Visitable@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Optional<Expression> getLabel()
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<Statement> getStatements()
getStatements in interface NodeWithStatements<SwitchEntryStmt>@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public SwitchEntryStmt setLabel(Expression label)
label - the label, can be null@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public SwitchEntryStmt setStatements(NodeList<Statement> statements)
setStatements in interface NodeWithStatements<SwitchEntryStmt>@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public SwitchEntryStmt removeLabel()
@Generated(value="com.github.javaparser.generator.core.node.CloneGenerator") public SwitchEntryStmt clone()
@Generated(value="com.github.javaparser.generator.core.node.GetMetaModelGenerator") public SwitchEntryStmtMetaModel getMetaModel()
getMetaModel in class Statement@Generated(value="com.github.javaparser.generator.core.node.ReplaceMethodGenerator") public boolean replace(Node node, Node replacementNode)
@Generated(value="com.github.javaparser.generator.core.node.TypeCastingGenerator") public boolean isSwitchEntryStmt()
isSwitchEntryStmt in class Statement@Generated(value="com.github.javaparser.generator.core.node.TypeCastingGenerator") public SwitchEntryStmt asSwitchEntryStmt()
asSwitchEntryStmt in class Statement@Generated(value="com.github.javaparser.generator.core.node.TypeCastingGenerator") public void ifSwitchEntryStmt(Consumer<SwitchEntryStmt> action)
ifSwitchEntryStmt in class StatementCopyright © 2007–2017. All rights reserved.