public class SynchronizedStmt extends Statement implements NodeWithBlockStmt<SynchronizedStmt>, NodeWithExpression<SynchronizedStmt>
synchronized (a123) { ... }
the expression is a123 and { ... } is the bodyNode.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, PHANTOM_KEY, prettyPrinterNoCommentsConfiguration, PRINTER_KEY, SYMBOL_RESOLVER_KEY
Constructor and Description |
---|
SynchronizedStmt() |
SynchronizedStmt(Expression expression,
BlockStmt body) |
SynchronizedStmt(TokenRange tokenRange,
Expression expression,
BlockStmt body)
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.
|
SynchronizedStmt |
asSynchronizedStmt() |
SynchronizedStmt |
clone() |
BlockStmt |
getBody() |
Expression |
getExpression() |
SynchronizedStmtMetaModel |
getMetaModel() |
void |
ifSynchronizedStmt(Consumer<SynchronizedStmt> action) |
boolean |
isSynchronizedStmt() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
SynchronizedStmt |
setBody(BlockStmt body) |
SynchronizedStmt |
setExpression(Expression expression) |
Optional<SynchronizedStmt> |
toSynchronizedStmt() |
asAssertStmt, asBlockStmt, asBreakStmt, asContinueStmt, asDoStmt, asEmptyStmt, asExplicitConstructorInvocationStmt, asExpressionStmt, asForEachStmt, asForStmt, asIfStmt, asLabeledStmt, asLocalClassDeclarationStmt, asReturnStmt, asSwitchStmt, asThrowStmt, asTryStmt, asUnparsableStmt, asWhileStmt, asYieldStmt, ifAssertStmt, ifBlockStmt, ifBreakStmt, ifContinueStmt, ifDoStmt, ifEmptyStmt, ifExplicitConstructorInvocationStmt, ifExpressionStmt, ifForEachStmt, ifForStmt, ifIfStmt, ifLabeledStmt, ifLocalClassDeclarationStmt, ifReturnStmt, ifSwitchStmt, ifThrowStmt, ifTryStmt, ifUnparsableStmt, ifWhileStmt, ifYieldStmt, isAssertStmt, isBlockStmt, isBreakStmt, isContinueStmt, isDoStmt, isEmptyStmt, isExplicitConstructorInvocationStmt, isExpressionStmt, isForEachStmt, isForStmt, isIfStmt, isLabeledStmt, isLocalClassDeclarationStmt, isReturnStmt, isSwitchStmt, isThrowStmt, isTryStmt, isUnparsableStmt, isWhileStmt, isYieldStmt, toAssertStmt, toBlockStmt, toBreakStmt, toContinueStmt, toDoStmt, toEmptyStmt, toExplicitConstructorInvocationStmt, toExpressionStmt, toForEachStmt, toForStmt, toIfStmt, toLabeledStmt, toLocalClassDeclarationStmt, toReturnStmt, toSwitchStmt, toThrowStmt, toTryStmt, toUnparsableStmt, toWhileStmt, toYieldStmt
addOrphanComment, containsData, createDefaultPrinter, createDefaultPrinter, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getDefaultPrinterConfiguration, getLineEndingStyle, getLineEndingStyleOrDefault, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getPrinter, getPrinter, getRange, getSymbolResolver, getTokenRange, hashCode, hasScope, isAncestorOf, isPhantom, 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
createBody
setExpression
findAncestor, findAncestor, hasParentNode, isDescendantOf
containsWithin, containsWithinRange, getBegin, getEnd, hasRange
public SynchronizedStmt()
public SynchronizedStmt(Expression expression, BlockStmt body)
public SynchronizedStmt(TokenRange tokenRange, Expression expression, BlockStmt body)
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<SynchronizedStmt>
public SynchronizedStmt setExpression(Expression expression)
setExpression
in interface NodeWithExpression<SynchronizedStmt>
public BlockStmt getBody()
getBody
in interface NodeWithBlockStmt<SynchronizedStmt>
public SynchronizedStmt setBody(BlockStmt body)
setBody
in interface NodeWithBlockStmt<SynchronizedStmt>
public SynchronizedStmt clone()
public SynchronizedStmtMetaModel getMetaModel()
getMetaModel
in class Statement
public boolean isSynchronizedStmt()
isSynchronizedStmt
in class Statement
public SynchronizedStmt asSynchronizedStmt()
asSynchronizedStmt
in class Statement
public void ifSynchronizedStmt(Consumer<SynchronizedStmt> action)
ifSynchronizedStmt
in class Statement
public Optional<SynchronizedStmt> toSynchronizedStmt()
toSynchronizedStmt
in class Statement
Copyright © 2007–2021. All rights reserved.