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 TypeClassDescriptionclassclassclassclassListTreeImpl<T extends Tree>classclassclassclassclassclassMethods 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 booleanPublicApiChecker.isPublicApi(Tree currentParent, Tree tree) voidvoidintLinesOfCodeVisitor.linesOfCode(Tree tree) intStatementVisitor.numberOfStatements(Tree tree) protected voidvoidvoidvoid -
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) intMetricsComputer.getLinesOfCode(Tree tree) intMetricsComputer.getNumberOfStatements(Tree tree) -
Uses of Tree in org.sonar.java.model
Subinterfaces of Tree in org.sonar.java.modelModifier and TypeInterfaceDescriptionstatic interfaceThis 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 TypeClassDescriptionclassThis class is intended for internal use during semantic analysis and should not be used in checks.classclassclassclassstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classclassMethods in org.sonar.java.model that return TreeModifier and TypeMethodDescriptionstatic TreeExpressionUtils.getParentOfType(Tree tree, Tree.Kind... kinds) JavaTree.parent()JavaTree.ImportTreeImpl.qualifiedIdentifier()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 booleanSyntacticEquivalence.areEquivalent(Tree leftNode, Tree rightNode) static booleanSyntacticEquivalence.areEquivalentIncludingSameVariables(Tree left, Tree right) Syntactic equivalence with additional semantic equivalence for identifiers.protected static AnalyzerMessageDefaultJavaFileScannerContext.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 SymbolJUtils.enclosingClass(Tree t) static intstatic List<AnnotationTree>ModifiersUtils.getAnnotations(Tree tree) DefaultJavaFileScannerContext.getComplexityNodes(Tree tree) static TreeExpressionUtils.getParentOfType(Tree tree, Tree.Kind... kinds) static booleanstatic booleanLiteralUtils.isEmptyString(Tree tree) static booleanstatic booleanvoidDefaultJavaFileScannerContext.reportIssue(RegexCheck regexCheck, Tree javaSyntaxElement, String message, Integer cost, List<RegexCheck.RegexIssueLocation> secondaries) voidDefaultJavaFileScannerContext.reportIssue(JavaCheck javaCheck, Tree tree, String message) voidDefaultJavaFileScannerContext.reportIssue(JavaCheck javaCheck, Tree syntaxNode, String message, List<JavaFileScannerContext.Location> secondary, Integer cost) voidDefaultJavaFileScannerContext.reportIssue(JavaCheck javaCheck, Tree startTree, Tree endTree, String message) voidDefaultJavaFileScannerContext.reportIssue(JavaCheck javaCheck, Tree startTree, Tree endTree, String message, List<JavaFileScannerContext.Location> secondary, Integer cost) voidDefaultJavaFileScannerContext.reportIssueWithFlow(JavaCheck javaCheck, Tree syntaxNode, String message, Iterable<List<JavaFileScannerContext.Location>> flows, Integer cost) voidstatic intvoidvoidMethod parameters in org.sonar.java.model with type arguments of type TreeModifier and TypeMethodDescriptionstatic booleanSyntacticEquivalence.areEquivalent(List<? extends Tree> leftList, List<? extends Tree> rightList) static booleanSyntacticEquivalence.areEquivalent(List<? extends Tree> leftList, List<? extends Tree> rightList, BiPredicate<JavaTree, JavaTree> permissiveEquivalence) static booleanSyntacticEquivalence.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 TypeClassDescriptionclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassMethods 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 TypeClassDescriptionclassclassParent class for all ExpressionTrees, which allows to express them as their constant valueclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassMethods 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 TypeClassDescriptionclassJDK 17 Preview feature (JEP-406), deprecated by design until it will be final java:S1874 = "@Deprecated" code should not be usedclassJDK 17 Preview feature (JEP-406), deprecated by design until it will be final java:S1874 = "@Deprecated" code should not be usedclassJDK 17 Preview feature (JEP-406), deprecated by design until it will be final java:S1874 = "@Deprecated" code should not be usedclassJDK 17 Preview feature (JEP-406), deprecated by design until it will be final java:S1874 = "@Deprecated" code should not be usedclassJDK 17 Preview feature (JEP-406), deprecated by design until it will be final java:S1874 = "@Deprecated" code should not be usedMethods 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 TypeClassDescriptionclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassMethods 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 TypeMethodDescriptionvoidRegexScannerContext.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 JavaTextEditJavaTextEdit.insertAfterTree(Tree tree, String addition) static JavaTextEditJavaTextEdit.insertBeforeTree(Tree tree, String addition) final InternalJavaIssueBuilderfinal InternalJavaIssueBuilderstatic JavaTextEditJavaTextEdit.removeBetweenTree(Tree startTree, Tree endTree) static JavaTextEditJavaTextEdit.removeTree(Tree tree) static JavaTextEditJavaTextEdit.replaceBetweenTree(Tree startTree, boolean includeStart, Tree endTree, boolean includeEnd, String replacement) static JavaTextEditJavaTextEdit.replaceBetweenTree(Tree startTree, Tree endTree, String replacement) From startTree first token to endTree last token.static JavaTextEditJavaTextEdit.replaceTree(Tree tree, String replacement) static AnalyzerMessage.TextSpanAnalyzerMessage.textSpanBetween(Tree startTree, boolean includeStart, Tree endTree, boolean includeEnd) static AnalyzerMessage.TextSpanAnalyzerMessage.textSpanBetween(Tree startTree, Tree endTree) static AnalyzerMessage.TextSpanAnalyzerMessage.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) voidJavaFileScannerContextForTests.reportIssue(JavaCheck javaCheck, Tree tree, String message) voidJavaFileScannerContextForTests.reportIssue(JavaCheck javaCheck, Tree syntaxNode, String message, List<JavaFileScannerContext.Location> secondary, Integer cost) voidJavaFileScannerContextForTests.reportIssue(JavaCheck javaCheck, Tree startTree, Tree endTree, String message) voidJavaFileScannerContextForTests.reportIssue(JavaCheck javaCheck, Tree startTree, Tree endTree, String message, List<JavaFileScannerContext.Location> secondary, Integer cost) voidJavaFileScannerContextForTests.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 TreeJavaFileScannerContext.Location.syntaxNodeSyntax 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.voidIssuableSubscriptionVisitor.reportIssue(Tree tree, String message) Report an issue.voidIssuableSubscriptionVisitor.reportIssue(Tree tree, String message, List<JavaFileScannerContext.Location> flow, Integer cost) Report an issue.voidIssuableSubscriptionVisitor.reportIssue(Tree startTree, Tree endTree, String message) Report an issue.voidJavaFileScannerContext.reportIssue(JavaCheck javaCheck, Tree tree, String message) Report an issue.voidJavaFileScannerContext.reportIssue(JavaCheck javaCheck, Tree tree, String message, List<JavaFileScannerContext.Location> secondaryLocations, Integer cost) Report an issue.voidJavaFileScannerContext.reportIssue(JavaCheck javaCheck, Tree startTree, Tree endTree, String message) Report an issue.voidJavaFileScannerContext.reportIssue(JavaCheck javaCheck, Tree startTree, Tree endTree, String message, List<JavaFileScannerContext.Location> secondaryLocations, Integer cost) Report an issue.voidJavaFileScannerContext.reportIssueWithFlow(JavaCheck javaCheck, Tree tree, String message, Iterable<List<JavaFileScannerContext.Location>> flows, Integer cost) Report an issue.protected voidSourceMap.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_COMPARATORMethods 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 TypeInterfaceDescriptioninterfaceAnnotation.interfaceinterfaceArray access expression.interfaceDescribe an array dimension.interfaceArray type.interface'assert' statement.interfaceAssignment expression.interfaceBinary expression.interfaceBlock.interface'break' statement.interfaceGroup of 'case's in a 'switch' statement.interface'case' label in a 'switch' statement.interface'catch' in a 'try' statement.interfaceClass, enum, interface or annotation declaration.interfaceCompilation unit.interfaceConditional expression.interface'continue' statement.interfaceDeprecated.Preview Featureinterface'do' statement.interfaceEmpty statement.interfaceEnum constant.interfaceThe 'exports' directive from java 9 module directives JLS9 - §7.7.2interfaceExpression statement.interfaceCommon interface for all types of expressions.interfaceEnhanced 'for' statement.interface'for' statement.interfaceDeprecated.Preview FeatureinterfaceIdentifier expression.interface'if' statement.interfaceCommon interface for all import clauses.interfaceImport declaration.interface'instanceof' expression.interfaceLabeled statement.interfaceLambda expression.interfaceinterfaceLiteral expression.interfaceMember select expression.interfaceMethod invocation expression.interfaceMethod reference.interfaceMethod or annotation type element declaration.interfaceinterfaceModifiers.interfaceinterfaceModule declaration.interfaceCommon interface for all the module directives JLS9 - §7.7interfaceModule Name.interfaceArray creation expression.interfaceClass instance creation expression.interfaceDeprecated.Preview FeatureinterfaceThe 'opens' directive from java 9 module directives JLS9 - §7.7.2interfacePackage declaration.interfaceParameterized type.interfaceParenthesized expression.interface'instanceof' expression with pattern-matching.interfaceDeprecated.Preview FeatureinterfacePrimitive type.interfaceThe 'provides' directive from java 9 module directives JLS9 - §7.7.4interfaceThe 'requires' directive from java 9 module directives JLS9 - §7.7.1interface'return' statement.interfaceCommon interface for all types of statements.interfaceStatic Initializer.interface'switch' expression.interface'switch' statement.interfaceCommon interface shared betweenSwitchStatementTreeandSwitchExpressionTreeinterface'synchronized' statement.interfaceRepresents a token in the syntax tree.interfaceRepresents a Trivia in the SyntaxTree.interface'throw' statement.interface'try' statement.interfaceinterfaceCast expression.interfaceinterfaceType parameter.interfaceDeprecated.Preview FeatureinterfaceinterfacePostfix or unary expression.interfaceUnion type expression in a multi-catch.interfaceThe 'uses' directive from java 9 module directives JLS9 - §7.7.3interfaceVariable declaration.interface'var' type tree used for local variables.interface'while' statement.interfaceWildcard 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 voidvoidBaseTreeVisitor.visitOther(Tree tree) voidTreeVisitor.visitOther(Tree tree) Method parameters in org.sonar.plugins.java.api.tree with type arguments of type Tree