Package org.sonar.java.model.statement
Class TryStatementTreeImpl
java.lang.Object
org.sonar.java.model.JavaTree
org.sonar.java.model.statement.TryStatementTreeImpl
- All Implemented Interfaces:
StatementTree
,Tree
,TryStatementTree
-
Nested Class Summary
Nested classes/interfaces inherited from class org.sonar.java.model.JavaTree
JavaTree.AnnotatedTypeTree, JavaTree.ArrayTypeTreeImpl, JavaTree.CompilationUnitTreeImpl, JavaTree.ImportTreeImpl, JavaTree.NotImplementedTreeImpl, JavaTree.PackageDeclarationTreeImpl, JavaTree.ParameterizedTypeTreeImpl, JavaTree.PrimitiveTypeTreeImpl, JavaTree.UnionTypeTreeImpl, JavaTree.WildcardTreeImpl
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTryStatementTreeImpl
(InternalSyntaxToken tryToken, InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, InternalSyntaxToken closeParenToken, BlockTreeImpl block, List<CatchTree> catches, InternalSyntaxToken finallyKeyword, BlockTreeImpl finallyBlock) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(TreeVisitor visitor) block()
catches()
children()
Creates iterable for children of this node.kind()
Until Java 9, resource could only be instance ofVariableTree
.Methods inherited from class org.sonar.java.model.JavaTree
firstToken, getChildren, getLine, is, isLeaf, lastToken, parent, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.sonar.plugins.java.api.tree.Tree
firstToken, is, lastToken, parent
-
Constructor Details
-
TryStatementTreeImpl
public TryStatementTreeImpl(InternalSyntaxToken tryToken, @Nullable InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, @Nullable InternalSyntaxToken closeParenToken, BlockTreeImpl block, List<CatchTree> catches, @Nullable InternalSyntaxToken finallyKeyword, @Nullable BlockTreeImpl finallyBlock)
-
-
Method Details
-
kind
-
tryKeyword
- Specified by:
tryKeyword
in interfaceTryStatementTree
-
openParenToken
- Specified by:
openParenToken
in interfaceTryStatementTree
-
resourceList
Description copied from interface:TryStatementTree
Until Java 9, resource could only be instance ofVariableTree
. Since Java 9 it is possible to refer to resources by existing effectively final variables, so list can also containIdentifierTree
orMemberSelectExpressionTree
.- Specified by:
resourceList
in interfaceTryStatementTree
-
closeParenToken
- Specified by:
closeParenToken
in interfaceTryStatementTree
-
block
- Specified by:
block
in interfaceTryStatementTree
-
catches
- Specified by:
catches
in interfaceTryStatementTree
-
finallyKeyword
- Specified by:
finallyKeyword
in interfaceTryStatementTree
-
finallyBlock
- Specified by:
finallyBlock
in interfaceTryStatementTree
-
accept
-
children
Description copied from class:JavaTree
Creates iterable for children of this node. Note that iterable may containnull
elements.
-