Uses of Interface
org.sonar.plugins.java.api.tree.Tree
Packages that use Tree
Package
Description
Provides interfaces to represent Java source code as syntax tree.
Provides interfaces to represent Java source code as syntax tree.
Provides interfaces to represent Java source code as syntax tree.
-
Uses of Tree in org.sonar.java
Methods in org.sonar.java with parameters of type Tree -
Uses of Tree in org.sonar.java.ast.parser
Classes in org.sonar.java.ast.parser with type parameters of type TreeClasses in org.sonar.java.ast.parser that implement TreeModifier and TypeClassDescriptionclass
class
class
class
ListTreeImpl<T extends Tree>
class
class
class
class
class
class
Methods in org.sonar.java.ast.parser that return types with arguments of type Tree -
Uses of Tree in org.sonar.java.ast.visitors
Methods in org.sonar.java.ast.visitors that return types with arguments of type TreeMethods in org.sonar.java.ast.visitors with parameters of type TreeModifier and TypeMethodDescriptionPublicApiChecker.getApiJavadoc
(Tree tree) static boolean
PublicApiChecker.isPublicApi
(Tree currentParent, Tree tree) void
void
int
LinesOfCodeVisitor.linesOfCode
(Tree tree) int
StatementVisitor.numberOfStatements
(Tree tree) protected void
void
void
void
-
Uses of Tree in org.sonar.java.cfg
Methods in org.sonar.java.cfg that return TreeMethods in org.sonar.java.cfg that return types with arguments of type TreeMethod parameters in org.sonar.java.cfg with type arguments of type Tree -
Uses of Tree in org.sonar.java.metrics
Methods in org.sonar.java.metrics that return types with arguments of type TreeMethods in org.sonar.java.metrics with parameters of type TreeModifier and TypeMethodDescriptionMetricsComputer.getComplexityNodes
(Tree tree) int
MetricsComputer.getLinesOfCode
(Tree tree) int
MetricsComputer.getNumberOfStatements
(Tree tree) -
Uses of Tree in org.sonar.java.model
Subinterfaces of Tree in org.sonar.java.modelModifier and TypeInterfaceDescriptionstatic interface
This interface is dedicated to mark TypeTrees which will requires completion of their annotations during parsing.Classes in org.sonar.java.model that implement TreeModifier and TypeClassDescriptionclass
This class is intended for internal use during semantic analysis and should not be used in checks.class
class
class
class
static class
static class
static class
static class
static class
static class
static class
static class
static class
class
Methods in org.sonar.java.model that return TreeModifier and TypeMethodDescriptionstatic Tree
ExpressionUtils.getEnclosingTree
(Tree expr, Tree.Kind... kinds) static Tree
ExpressionUtils.getParentOfType
(Tree tree, Tree.Kind... kinds) JavaTree.parent()
JavaTree.ImportTreeImpl.qualifiedIdentifier()
static Tree
ExpressionUtils.skipParenthesesUpwards
(Tree tree) JWarning.syntaxTree()
Methods in org.sonar.java.model that return types with arguments of type TreeModifier and TypeMethodDescriptionArrayDimensionTreeImpl.children()
InternalSyntaxToken.children()
InternalSyntaxTrivia.children()
JavaTree.ArrayTypeTreeImpl.children()
JavaTree.children()
Creates iterable for children of this node.JavaTree.CompilationUnitTreeImpl.children()
JavaTree.ImportTreeImpl.children()
JavaTree.NotImplementedTreeImpl.children()
JavaTree.PackageDeclarationTreeImpl.children()
JavaTree.ParameterizedTypeTreeImpl.children()
JavaTree.PrimitiveTypeTreeImpl.children()
JavaTree.UnionTypeTreeImpl.children()
JavaTree.WildcardTreeImpl.children()
TypeParameterTreeImpl.children()
JavaTree.getChildren()
DefaultJavaFileScannerContext.getComplexityNodes
(Tree tree) JavaTree.CompilationUnitTreeImpl.types()
Methods in org.sonar.java.model with parameters of type TreeModifier and TypeMethodDescriptionstatic boolean
SyntacticEquivalence.areEquivalent
(Tree leftNode, Tree rightNode) static boolean
SyntacticEquivalence.areEquivalent
(Tree leftNode, Tree rightNode, BiPredicate<JavaTree, JavaTree> overwriteEquivalence, boolean equivalenceValue) static boolean
SyntacticEquivalence.areEquivalentIncludingSameVariables
(Tree left, Tree right) Syntactic equivalence with additional semantic equivalence for identifiers.static boolean
ExpressionUtils.areVariablesSame
(Tree tree1, Tree tree2, boolean defaultValue) protected static AnalyzerMessage
DefaultJavaFileScannerContext.createAnalyzerMessage
(org.sonar.api.batch.fs.InputFile inputFile, JavaCheck javaCheck, Tree startTree, Tree endTree, String message, Iterable<List<JavaFileScannerContext.Location>> flows, Integer cost) DefaultJavaFileScannerContext.createAnalyzerMessage
(JavaCheck javaCheck, Tree startTree, String message) static Symbol
JUtils.enclosingClass
(Tree t) static int
static List
<AnnotationTree> ModifiersUtils.getAnnotations
(Tree tree) DefaultJavaFileScannerContext.getComplexityNodes
(Tree tree) static Tree
ExpressionUtils.getEnclosingTree
(Tree expr, Tree.Kind... kinds) static Tree
ExpressionUtils.getParentOfType
(Tree tree, Tree.Kind... kinds) static boolean
static boolean
LiteralUtils.isEmptyString
(Tree tree) static boolean
static boolean
void
DefaultJavaFileScannerContext.reportIssue
(RegexCheck regexCheck, Tree javaSyntaxElement, String message, Integer cost, List<RegexCheck.RegexIssueLocation> secondaries) void
DefaultJavaFileScannerContext.reportIssue
(JavaCheck javaCheck, Tree tree, String message) void
DefaultJavaFileScannerContext.reportIssue
(JavaCheck javaCheck, Tree syntaxNode, String message, List<JavaFileScannerContext.Location> secondary, Integer cost) void
DefaultJavaFileScannerContext.reportIssue
(JavaCheck javaCheck, Tree startTree, Tree endTree, String message) void
DefaultJavaFileScannerContext.reportIssue
(JavaCheck javaCheck, Tree startTree, Tree endTree, String message, List<JavaFileScannerContext.Location> secondary, Integer cost) void
DefaultJavaFileScannerContext.reportIssueWithFlow
(JavaCheck javaCheck, Tree syntaxNode, String message, Iterable<List<JavaFileScannerContext.Location>> flows, Integer cost) void
static Tree
ExpressionUtils.skipParenthesesUpwards
(Tree tree) static int
void
void
Method parameters in org.sonar.java.model with type arguments of type TreeModifier and TypeMethodDescriptionstatic boolean
SyntacticEquivalence.areEquivalent
(List<? extends Tree> leftList, List<? extends Tree> rightList) static boolean
SyntacticEquivalence.areEquivalent
(List<? extends Tree> leftList, List<? extends Tree> rightList, BiPredicate<JavaTree, JavaTree> permissiveEquivalence) static boolean
SyntacticEquivalence.areSemanticallyEquivalent
(List<? extends Tree> leftList, List<? extends Tree> rightList) Syntactic equivalence with additional semantic equivalence for methods calls.Constructors in org.sonar.java.model with parameters of type TreeModifierConstructorDescriptionImportTreeImpl
(InternalSyntaxToken importToken, InternalSyntaxToken staticToken, Tree qualifiedIdentifier, InternalSyntaxToken semiColonToken) -
Uses of Tree in org.sonar.java.model.declaration
Classes in org.sonar.java.model.declaration that implement TreeModifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Methods in org.sonar.java.model.declaration that return types with arguments of type TreeModifier and TypeMethodDescriptionAnnotationTreeImpl.children()
ClassTreeImpl.children()
EnumConstantTreeImpl.children()
MethodTreeImpl.children()
ModuleDeclarationTreeImpl.children()
ProvidesDirectiveTreeImpl.children()
RequiresDirectiveTreeImpl.children()
SimpleModuleDirectiveTreeImpl.children()
UsesDirectiveTreeImpl.children()
VariableTreeImpl.children()
ClassTreeImpl.members()
Constructor parameters in org.sonar.java.model.declaration with type arguments of type TreeModifierConstructorDescriptionClassTreeImpl
(Tree.Kind kind, SyntaxToken openBraceToken, List<Tree> members, SyntaxToken closeBraceToken) -
Uses of Tree in org.sonar.java.model.expression
Classes in org.sonar.java.model.expression that implement TreeModifier and TypeClassDescriptionclass
class
Parent class for all ExpressionTrees, which allows to express them as their constant valueclass
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Methods in org.sonar.java.model.expression that return TreeModifier and TypeMethodDescriptionLambdaExpressionTreeImpl.body()
MethodReferenceTreeImpl.expression()
Methods in org.sonar.java.model.expression that return types with arguments of type TreeModifier and TypeMethodDescriptionArrayAccessExpressionTreeImpl.children()
AssignmentExpressionTreeImpl.children()
BinaryExpressionTreeImpl.children()
ConditionalExpressionTreeImpl.children()
IdentifierTreeImpl.children()
InstanceOfTreeImpl.children()
InternalPostfixUnaryExpression.children()
InternalPrefixUnaryExpression.children()
LambdaExpressionTreeImpl.children()
LiteralTreeImpl.children()
MemberSelectExpressionTreeImpl.children()
MethodInvocationTreeImpl.children()
MethodReferenceTreeImpl.children()
NewArrayTreeImpl.children()
NewClassTreeImpl.children()
ParenthesizedTreeImpl.children()
TypeArgumentListTreeImpl.children()
TypeCastExpressionTreeImpl.children()
VarTypeTreeImpl.children()
Constructors in org.sonar.java.model.expression with parameters of type TreeModifierConstructorDescriptionLambdaExpressionTreeImpl
(InternalSyntaxToken openParenToken, List<VariableTree> parameters, InternalSyntaxToken closeParenToken, InternalSyntaxToken arrowToken, Tree body) MethodReferenceTreeImpl
(Tree expression, InternalSyntaxToken doubleColon) -
Uses of Tree in org.sonar.java.model.pattern
Classes in org.sonar.java.model.pattern that implement TreeModifier and TypeClassDescriptionclass
JDK 17 Preview feature (JEP-405, JEP-406), finalized in JDK 21 (JEP-440, JEP-441).class
JDK 17 Preview feature (JEP-406), finalized in JDK 21 (JEP-441).class
JDK 17 Preview feature (JEP-406), finalized in JDK 21 (JEP-441).class
JDK 17 Preview feature (JEP-406), finalized in JDK 21 (JEP-441).class
JDK 19 Preview feature (JEP-405), finalized in JDK 21 (JEP-440).class
JDK 17 Preview feature (JEP-406), finalized in JDK 21 (JEP-441).Methods in org.sonar.java.model.pattern that return types with arguments of type Tree -
Uses of Tree in org.sonar.java.model.statement
Classes in org.sonar.java.model.statement that implement TreeModifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
class
Methods in org.sonar.java.model.statement that return types with arguments of type TreeModifier and TypeMethodDescriptionAssertStatementTreeImpl.children()
BlockTreeImpl.children()
BreakStatementTreeImpl.children()
CaseGroupTreeImpl.children()
CaseLabelTreeImpl.children()
CatchTreeImpl.children()
ContinueStatementTreeImpl.children()
DoWhileStatementTreeImpl.children()
EmptyStatementTreeImpl.children()
ExpressionStatementTreeImpl.children()
ForEachStatementImpl.children()
ForStatementTreeImpl.children()
IfStatementTreeImpl.children()
LabeledStatementTreeImpl.children()
ReturnStatementTreeImpl.children()
StaticInitializerTreeImpl.children()
SwitchTreeImpl.children()
SynchronizedStatementTreeImpl.children()
ThrowStatementTreeImpl.children()
TryStatementTreeImpl.children()
WhileStatementTreeImpl.children()
YieldStatementTreeImpl.children()
TryStatementTreeImpl.resourceList()
-
Uses of Tree in org.sonar.java.regex
Methods in org.sonar.java.regex with parameters of type TreeModifier and TypeMethodDescriptionvoid
RegexScannerContext.reportIssue
(RegexCheck regexCheck, Tree javaSyntaxElement, String message, Integer cost, List<RegexCheck.RegexIssueLocation> secondaries) -
Uses of Tree in org.sonar.java.reporting
Methods in org.sonar.java.reporting with parameters of type TreeModifier and TypeMethodDescriptionstatic JavaTextEdit
JavaTextEdit.insertAfterTree
(Tree tree, String addition) static JavaTextEdit
JavaTextEdit.insertBeforeTree
(Tree tree, String addition) final InternalJavaIssueBuilder
final InternalJavaIssueBuilder
static JavaTextEdit
JavaTextEdit.removeBetweenTree
(Tree startTree, Tree endTree) static JavaTextEdit
JavaTextEdit.removeTree
(Tree tree) static JavaTextEdit
JavaTextEdit.replaceBetweenTree
(Tree startTree, boolean includeStart, Tree endTree, boolean includeEnd, String replacement) static JavaTextEdit
JavaTextEdit.replaceBetweenTree
(Tree startTree, Tree endTree, String replacement) From startTree first token to endTree last token.static JavaTextEdit
JavaTextEdit.replaceTree
(Tree tree, String replacement) static AnalyzerMessage.TextSpan
AnalyzerMessage.textSpanBetween
(Tree startTree, boolean includeStart, Tree endTree, boolean includeEnd) static AnalyzerMessage.TextSpan
AnalyzerMessage.textSpanBetween
(Tree startTree, Tree endTree) static AnalyzerMessage.TextSpan
AnalyzerMessage.textSpanFor
(Tree syntaxNode) -
Uses of Tree in org.sonar.java.testing
Methods in org.sonar.java.testing with parameters of type TreeModifier and TypeMethodDescriptionJavaFileScannerContextForTests.createAnalyzerMessage
(JavaCheck javaCheck, Tree startTree, String message) void
JavaFileScannerContextForTests.reportIssue
(JavaCheck javaCheck, Tree tree, String message) void
JavaFileScannerContextForTests.reportIssue
(JavaCheck javaCheck, Tree syntaxNode, String message, List<JavaFileScannerContext.Location> secondary, Integer cost) void
JavaFileScannerContextForTests.reportIssue
(JavaCheck javaCheck, Tree startTree, Tree endTree, String message) void
JavaFileScannerContextForTests.reportIssue
(JavaCheck javaCheck, Tree startTree, Tree endTree, String message, List<JavaFileScannerContext.Location> secondary, Integer cost) void
JavaFileScannerContextForTests.reportIssueWithFlow
(JavaCheck javaCheck, Tree syntaxNode, String message, Iterable<List<JavaFileScannerContext.Location>> flows, Integer cost) -
Uses of Tree in org.sonar.plugins.java.api
Fields in org.sonar.plugins.java.api declared as TreeModifier and TypeFieldDescriptionfinal Tree
JavaFileScannerContext.Location.syntaxNode
Syntax node on which to raise the secondary location.Methods in org.sonar.plugins.java.api that return types with arguments of type TreeModifier and TypeMethodDescriptionJavaFileScannerContext.getComplexityNodes
(Tree tree) Computes the list of syntax nodes which are contributing to increase the complexity for the given methodTree.Methods in org.sonar.plugins.java.api with parameters of type TreeModifier and TypeMethodDescriptionJavaFileScannerContext.getComplexityNodes
(Tree tree) Computes the list of syntax nodes which are contributing to increase the complexity for the given methodTree.void
IssuableSubscriptionVisitor.reportIssue
(Tree tree, String message) Report an issue.void
IssuableSubscriptionVisitor.reportIssue
(Tree tree, String message, List<JavaFileScannerContext.Location> flow, Integer cost) Report an issue.void
IssuableSubscriptionVisitor.reportIssue
(Tree startTree, Tree endTree, String message) Report an issue.void
IssuableSubscriptionVisitor.reportIssue
(Tree startTree, Tree endTree, String message, List<JavaFileScannerContext.Location> flow, Integer cost) Report an issue.void
JavaFileScannerContext.reportIssue
(JavaCheck javaCheck, Tree tree, String message) Report an issue.void
JavaFileScannerContext.reportIssue
(JavaCheck javaCheck, Tree tree, String message, List<JavaFileScannerContext.Location> secondaryLocations, Integer cost) Report an issue.void
JavaFileScannerContext.reportIssue
(JavaCheck javaCheck, Tree startTree, Tree endTree, String message) Report an issue.void
JavaFileScannerContext.reportIssue
(JavaCheck javaCheck, Tree startTree, Tree endTree, String message, List<JavaFileScannerContext.Location> secondaryLocations, Integer cost) Report an issue.void
JavaFileScannerContext.reportIssueWithFlow
(JavaCheck javaCheck, Tree tree, String message, Iterable<List<JavaFileScannerContext.Location>> flows, Integer cost) Report an issue.protected final void
Deprecated.SourceMap.sourceMapLocationFor
(Tree tree) Return location in JSP file corresponding to the AST nodeConstructors in org.sonar.plugins.java.api with parameters of type Tree -
Uses of Tree in org.sonar.plugins.java.api.cfg
Methods in org.sonar.plugins.java.api.cfg that return TreeMethods in org.sonar.plugins.java.api.cfg that return types with arguments of type Tree -
Uses of Tree in org.sonar.plugins.java.api.location
Fields in org.sonar.plugins.java.api.location with type parameters of type TreeModifier and TypeFieldDescriptionstatic final Comparator
<Tree> Position.TREE_START_POSITION_COMPARATOR
Methods in org.sonar.plugins.java.api.location with parameters of type Tree -
Uses of Tree in org.sonar.plugins.java.api.semantic
Methods in org.sonar.plugins.java.api.semantic that return TreeModifier and TypeMethodDescriptionSymbol.declaration()
Declaration node of this symbol.SymbolMetadata.NullabilityData.declaration()
-
Uses of Tree in org.sonar.plugins.java.api.tree
Classes in org.sonar.plugins.java.api.tree with type parameters of type TreeSubinterfaces of Tree in org.sonar.plugins.java.api.treeModifier and TypeInterfaceDescriptioninterface
Annotation.interface
interface
Array access expression.interface
Describe an array dimension.interface
Array type.interface
'assert' statement.interface
Assignment expression.interface
Binary expression.interface
Block.interface
'break' statement.interface
Group of 'case's in a 'switch' statement.interface
'case' label in a 'switch' statement.interface
'catch' in a 'try' statement.interface
Class, enum, interface or annotation declaration.interface
Compilation unit.interface
Conditional expression.interface
'continue' statement.interface
Default pattern tree.interface
'do' statement.interface
Empty statement.interface
Enum constant.interface
The 'exports' directive from java 9 module directives JLS9 - §7.7.2interface
Expression statement.interface
Common interface for all types of expressions.interface
Enhanced 'for' statement.interface
'for' statement.interface
Guarded pattern tree Introduced with Java 17 and JEP-406.interface
Identifier expression.interface
'if' statement.interface
Common interface for all import clauses.interface
Import declaration.interface
'instanceof' expression.interface
Labeled statement.interface
Lambda expression.interface
interface
Literal expression.interface
Member select expression.interface
Method invocation expression.interface
Method reference.interface
Method or annotation type element declaration.interface
interface
Modifiers.interface
interface
Module declaration.interface
Common interface for all the module directives JLS9 - §7.7interface
Module Name.interface
Array creation expression.interface
Class instance creation expression.interface
Null pattern tree.interface
The 'opens' directive from java 9 module directives JLS9 - §7.7.2interface
Package declaration.interface
Parameterized type.interface
Parenthesized expression.interface
'instanceof' expression with pattern-matching.interface
Common interface shared between all possible pattern as introduced with Java 17 and JEP-406.interface
Primitive type.interface
The 'provides' directive from java 9 module directives JLS9 - §7.7.4interface
Record pattern tree.interface
The 'requires' directive from java 9 module directives JLS9 - §7.7.1interface
'return' statement.interface
Common interface for all types of statements.interface
Static Initializer.interface
'switch' expression.interface
'switch' statement.interface
Common interface shared betweenSwitchStatementTree
andSwitchExpressionTree
interface
'synchronized' statement.interface
Represents a token in the syntax tree.interface
Represents a Trivia in the SyntaxTree.interface
'throw' statement.interface
'try' statement.interface
interface
Cast expression.interface
interface
Type parameter.interface
Typed Pattern tree.interface
interface
Postfix or unary expression.interface
Union type expression in a multi-catch.interface
The 'uses' directive from java 9 module directives JLS9 - §7.7.3interface
Variable declaration.interface
'var' type tree used for local variables.interface
'while' statement.interface
Wildcard type argument.interface
'yield' statement.Classes in org.sonar.plugins.java.api.tree that implement TreeMethods in org.sonar.plugins.java.api.tree that return TreeModifier and TypeMethodDescriptionLambdaExpressionTree.body()
MethodReferenceTree.expression()
Tree.parent()
ImportTree.qualifiedIdentifier()
Methods in org.sonar.plugins.java.api.tree that return types with arguments of type TreeModifier and TypeMethodDescriptionInferedTypeTree.children()
Tree.Kind.getAssociatedInterface()
ClassTree.members()
TryStatementTree.resourceList()
Until Java 9, resource could only be instance ofVariableTree
.CompilationUnitTree.types()
Methods in org.sonar.plugins.java.api.tree with parameters of type TreeModifier and TypeMethodDescriptionprotected void
void
BaseTreeVisitor.visitOther
(Tree tree) void
TreeVisitor.visitOther
(Tree tree) Method parameters in org.sonar.plugins.java.api.tree with type arguments of type Tree
IssuableSubscriptionVisitor.leaveFile(JavaFileScannerContext)
orIssuableSubscriptionVisitor.setContext(JavaFileScannerContext)
instead.