Package com.github.javaparser.ast.stmt
Class Statement
java.lang.Object
com.github.javaparser.ast.Node
com.github.javaparser.ast.stmt.Statement
- All Implemented Interfaces:
NodeWithRange<Node>,NodeWithTokenRange<Node>,Observable,Visitable,HasParentNode<Node>,Cloneable
- Direct Known Subclasses:
AssertStmt,BlockStmt,BreakStmt,ContinueStmt,DoStmt,EmptyStmt,ExplicitConstructorInvocationStmt,ExpressionStmt,ForEachStmt,ForStmt,IfStmt,LabeledStmt,LocalClassDeclarationStmt,LocalRecordDeclarationStmt,ReturnStmt,SwitchStmt,SynchronizedStmt,ThrowStmt,TryStmt,UnparsableStmt,WhileStmt,YieldStmt
A base class for all statements.
- Author:
- Julio Vilmar Gesser
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.javaparser.ast.Node
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal -
Field Summary
Fields inherited from class com.github.javaparser.ast.Node
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, PHANTOM_KEY, prettyPrinterNoCommentsConfiguration, PRINTER_KEY, SYMBOL_RESOLVER_KEY -
Constructor Summary
ConstructorsConstructorDescriptionStatement(TokenRange tokenRange)This constructor is used by the parser and is considered private. -
Method Summary
Modifier and TypeMethodDescriptionasDoStmt()asIfStmt()clone()voidifAssertStmt(Consumer<AssertStmt> action)voidifBlockStmt(Consumer<BlockStmt> action)voidifBreakStmt(Consumer<BreakStmt> action)voidifContinueStmt(Consumer<ContinueStmt> action)voidvoidifEmptyStmt(Consumer<EmptyStmt> action)voidvoidifExpressionStmt(Consumer<ExpressionStmt> action)voidifForEachStmt(Consumer<ForEachStmt> action)voidvoidvoidifLabeledStmt(Consumer<LabeledStmt> action)voidvoidvoidifReturnStmt(Consumer<ReturnStmt> action)voidifSwitchStmt(Consumer<SwitchStmt> action)voidifSynchronizedStmt(Consumer<SynchronizedStmt> action)voidifThrowStmt(Consumer<ThrowStmt> action)voidvoidifUnparsableStmt(Consumer<UnparsableStmt> action)voidifWhileStmt(Consumer<WhileStmt> action)voidifYieldStmt(Consumer<YieldStmt> action)booleanbooleanbooleanbooleanbooleanisDoStmt()booleanbooleanbooleanbooleanbooleanbooleanisIfStmt()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleantoDoStmt()toIfStmt()Methods inherited from class com.github.javaparser.ast.Node
addOrphanComment, containsData, createDefaultPrinter, createDefaultPrinter, customInitialization, equals, findAll, 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, walkMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.javaparser.HasParentNode
findAncestor, findAncestor, hasParentNode, isDescendantOfMethods inherited from interface com.github.javaparser.ast.nodeTypes.NodeWithRange
containsWithin, containsWithinRange, getBegin, getEnd, hasRange
-
Constructor Details
-
Statement
public Statement() -
Statement
This constructor is used by the parser and is considered private.
-
-
Method Details
-
remove
-
clone
-
getMetaModel
- Overrides:
getMetaModelin classNode- Returns:
- get JavaParser specific node introspection information.
-
replace
-
isAssertStmt
public boolean isAssertStmt() -
asAssertStmt
-
isBlockStmt
public boolean isBlockStmt() -
asBlockStmt
-
isBreakStmt
public boolean isBreakStmt() -
asBreakStmt
-
isContinueStmt
public boolean isContinueStmt() -
asContinueStmt
-
isDoStmt
public boolean isDoStmt() -
asDoStmt
-
isEmptyStmt
public boolean isEmptyStmt() -
asEmptyStmt
-
isExplicitConstructorInvocationStmt
public boolean isExplicitConstructorInvocationStmt() -
asExplicitConstructorInvocationStmt
-
isExpressionStmt
public boolean isExpressionStmt() -
asExpressionStmt
-
isForStmt
public boolean isForStmt() -
asForStmt
-
isIfStmt
public boolean isIfStmt() -
asIfStmt
-
isLabeledStmt
public boolean isLabeledStmt() -
asLabeledStmt
-
isLocalClassDeclarationStmt
public boolean isLocalClassDeclarationStmt() -
isLocalRecordDeclarationStmt
public boolean isLocalRecordDeclarationStmt() -
asLocalClassDeclarationStmt
-
asLocalRecordDeclarationStmt
-
isReturnStmt
public boolean isReturnStmt() -
asReturnStmt
-
isSwitchStmt
public boolean isSwitchStmt() -
asSwitchStmt
-
isSynchronizedStmt
public boolean isSynchronizedStmt() -
asSynchronizedStmt
-
isThrowStmt
public boolean isThrowStmt() -
asThrowStmt
-
isTryStmt
public boolean isTryStmt() -
asTryStmt
-
isUnparsableStmt
public boolean isUnparsableStmt() -
asUnparsableStmt
-
isWhileStmt
public boolean isWhileStmt() -
asWhileStmt
-
ifAssertStmt
-
ifBlockStmt
-
ifBreakStmt
-
ifContinueStmt
-
ifDoStmt
-
ifEmptyStmt
-
ifExplicitConstructorInvocationStmt
public void ifExplicitConstructorInvocationStmt(Consumer<ExplicitConstructorInvocationStmt> action) -
ifExpressionStmt
-
ifForStmt
-
ifIfStmt
-
ifLabeledStmt
-
ifLocalClassDeclarationStmt
-
ifLocalRecordDeclarationStmt
-
ifReturnStmt
-
ifSwitchStmt
-
ifSynchronizedStmt
-
ifThrowStmt
-
ifTryStmt
-
ifUnparsableStmt
-
ifWhileStmt
-
toAssertStmt
-
toBlockStmt
-
toBreakStmt
-
toContinueStmt
-
toDoStmt
-
toEmptyStmt
-
toExplicitConstructorInvocationStmt
-
toExpressionStmt
-
toForStmt
-
toIfStmt
-
toLabeledStmt
-
toLocalClassDeclarationStmt
-
toLocalRecordDeclarationStmt
-
toReturnStmt
-
toSwitchStmt
-
toSynchronizedStmt
-
toThrowStmt
-
toTryStmt
-
toUnparsableStmt
-
toWhileStmt
-
isForEachStmt
public boolean isForEachStmt() -
asForEachStmt
-
toForEachStmt
-
ifForEachStmt
-
isYieldStmt
public boolean isYieldStmt() -
asYieldStmt
-
toYieldStmt
-
ifYieldStmt
-