public final class ExpressionStmt extends Statement implements NodeWithExpression<ExpressionStmt>
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY
Constructor and Description |
---|
ExpressionStmt() |
ExpressionStmt(Expression expression) |
ExpressionStmt(TokenRange tokenRange,
Expression expression)
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.
|
ExpressionStmt |
asExpressionStmt() |
ExpressionStmt |
clone() |
Expression |
getExpression() |
ExpressionStmtMetaModel |
getMetaModel() |
void |
ifExpressionStmt(Consumer<ExpressionStmt> action) |
boolean |
isExpressionStmt() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
ExpressionStmt |
setExpression(Expression expression) |
Optional<ExpressionStmt> |
toExpressionStmt() |
asAssertStmt, asBlockStmt, asBreakStmt, asContinueStmt, asDoStmt, asEmptyStmt, asExplicitConstructorInvocationStmt, asForEachStmt, asForStmt, asIfStmt, asLabeledStmt, asLocalClassDeclarationStmt, asReturnStmt, asSwitchStmt, asSynchronizedStmt, asThrowStmt, asTryStmt, asUnparsableStmt, asWhileStmt, ifAssertStmt, ifBlockStmt, ifBreakStmt, ifContinueStmt, ifDoStmt, ifEmptyStmt, ifExplicitConstructorInvocationStmt, ifForEachStmt, ifForStmt, ifIfStmt, ifLabeledStmt, ifLocalClassDeclarationStmt, ifReturnStmt, ifSwitchStmt, ifSynchronizedStmt, ifThrowStmt, ifTryStmt, ifUnparsableStmt, ifWhileStmt, isAssertStmt, isBlockStmt, isBreakStmt, isContinueStmt, isDoStmt, isEmptyStmt, isExplicitConstructorInvocationStmt, isForEachStmt, isForStmt, isIfStmt, isLabeledStmt, isLocalClassDeclarationStmt, isReturnStmt, isSwitchStmt, isSynchronizedStmt, isThrowStmt, isTryStmt, isUnparsableStmt, isWhileStmt, toAssertStmt, toBlockStmt, toBreakStmt, toContinueStmt, toDoStmt, toEmptyStmt, toExplicitConstructorInvocationStmt, toForEachStmt, toForStmt, toIfStmt, toLabeledStmt, toLocalClassDeclarationStmt, toReturnStmt, toSwitchStmt, toSynchronizedStmt, toThrowStmt, toTryStmt, toUnparsableStmt, toWhileStmt
addOrphanComment, containsData, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walk
finalize, getClass, notify, notifyAll, wait, wait, wait
setExpression
findAncestor, findAncestor, findParent, getAncestorOfType
containsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBefore
public ExpressionStmt()
public ExpressionStmt(Expression expression)
public ExpressionStmt(TokenRange tokenRange, Expression expression)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitable
accept
in interface Visitable
R
- 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)public <A> void accept(VoidVisitor<A> v, A arg)
Visitable
public Expression getExpression()
getExpression
in interface NodeWithExpression<ExpressionStmt>
public ExpressionStmt setExpression(Expression expression)
setExpression
in interface NodeWithExpression<ExpressionStmt>
public ExpressionStmt clone()
public ExpressionStmtMetaModel getMetaModel()
getMetaModel
in class Statement
public boolean isExpressionStmt()
isExpressionStmt
in class Statement
public ExpressionStmt asExpressionStmt()
asExpressionStmt
in class Statement
public void ifExpressionStmt(Consumer<ExpressionStmt> action)
ifExpressionStmt
in class Statement
public Optional<ExpressionStmt> toExpressionStmt()
toExpressionStmt
in class Statement
Copyright © 2007–2019. All rights reserved.