Uses of Interface
org.sonar.plugins.python.api.tree.Tree
Packages that use Tree
Package
Description
-
Uses of Tree in org.sonar.plugins.python.api
Methods in org.sonar.plugins.python.api that return TreeMethods in org.sonar.plugins.python.api with parameters of type TreeModifier and TypeMethodDescriptionprotected final PythonCheck.PreciseIssuestatic IssueLocationIssueLocation.preciseLocation(Tree tree, String message) -
Uses of Tree in org.sonar.plugins.python.api.cfg
Methods in org.sonar.plugins.python.api.cfg that return TreeModifier and TypeMethodDescriptionCfgBranchingBlock.branchingTree()Syntax tree causing branching: e.g. loop tree, if statement treeMethods in org.sonar.plugins.python.api.cfg that return types with arguments of type Tree -
Uses of Tree in org.sonar.plugins.python.api.symbols
Methods in org.sonar.plugins.python.api.symbols that return Tree -
Uses of Tree in org.sonar.plugins.python.api.tree
Subinterfaces of Tree in org.sonar.plugins.python.api.treeModifier and TypeInterfaceDescriptioninterfaceAliased nameinterfaceinterfaceinterfaceinterfaceCommon interface forRegularArgument,UnpackingExpressioninterfaceAs patterninterfaceinterfaceinterfaceinterfaceinterfaceinterfaceSee https://docs.python.org/3/reference/simple_stmts.html#grammar-token-break-stmtinterfaceinterfaceCapture PatterninterfaceCase blockinterfaceinterfaceinterfaceClass patterninterfaceinterfaceinterfaceinterfaceinterfaceinterfaceinterfaceSee https://docs.python.org/3/reference/simple_stmts.html#the-continue-statementinterfaceinterfaceinterfaceDictionary ComprehensioninterfaceinterfaceIt can be eitherKeyValuePairorUnpackingExpressioninterfaceExample:os.envorCrypto.Cipher.AESinterfaceDouble Star Pattern (only used within mapping patterns)interfaceinterfaceRepresents singleton Ellipsis objectinterfaceCommon interface for ElseClause used inIfStatement.elseBranch(),ForStatement.elseClause(),WhileStatement.elseClause()andTryStatement.elseClause()interfaceinterfacePython 2 only.interfaceinterfaceExample:interfaceSee https://docs.python.org/3/reference/simple_stmts.html#grammar-token-expression-stmtinterfaceRoot of the AST.interfacefinally:FinallyClause.body()interfaceinterfaceinterfaceinterfaceinterfaceCommon interface forFunctionDefandLambdaExpressioninterfaceglobalGlobalStatement.variables()interfaceGroup PatterninterfaceGuardinterfaceif-elif-else statement.interfaceImport From statementinterfaceImport statementinterfaceImport statement See https://docs.python.org/3/reference/simple_stmts.html#grammar-token-import-stmtinterfaceinterfaceinterfaceinterfaceKey Value Pattern (only used within mapping patterns)interfaceKeyword pattern Used only inside Class patterninterfaceinterfaceinterfaceinterfaceLiteral PatterninterfaceMapping PatterninterfaceMatch statementinterfaceSee https://docs.python.org/3/reference/expressions.html#atom-identifiersinterfaceSee https://docs.python.org/3/library/constants.html#NoneinterfacenonlocalNonlocalStatement.variables()interfaceinterfaceOR patterninterfaceinterfaceSee https://docs.python.org/3/reference/compound_stmts.html#grammar-token-parameter-listinterfaceinterfacehttps://docs.python.org/3/reference/simple_stmts.html#grammar-token-pass-stmtinterfaceinterfacePython 2 only.interfaceQualified expression like "foo.bar"interfaceinterfaceinterfacePython 2 only.interfaceinterfaceSequence PatterninterfaceinterfaceinterfaceinterfaceinterfaceStar Pattern Only used inside sequence patternsinterfaceinterfaceinterfaceinterfaceSee https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenationinterfaceinterfaceinterfaceinterface(Tuple.elements())interfacePython 2 onlyinterfaceinterfaceinterfaceinterfaceinterfaceinterfaceinterfaceValue PatterninterfaceinterfaceGroup PatterninterfaceinterfaceinterfaceinterfaceSee https://docs.python.org/3/reference/simple_stmts.html#grammar-token-yield-stmtMethods in org.sonar.plugins.python.api.tree that return TreeMethods in org.sonar.plugins.python.api.tree that return types with arguments of type TreeMethods in org.sonar.plugins.python.api.tree with parameters of type TreeMethod parameters in org.sonar.plugins.python.api.tree with type arguments of type Tree -
Uses of Tree in org.sonar.python.cfg
Methods in org.sonar.python.cfg that return TreeMethods in org.sonar.python.cfg that return types with arguments of type TreeMethods in org.sonar.python.cfg with parameters of type TreeConstructors in org.sonar.python.cfg with parameters of type TreeModifierConstructorDescriptionPythonCfgBranchingBlock(Tree branchingTree, CfgBlock trueSuccessor, CfgBlock falseSuccessor) -
Uses of Tree in org.sonar.python.cfg.fixpoint
Fields in org.sonar.python.cfg.fixpoint with type parameters of type TreeModifier and TypeFieldDescriptionprotected final Map<Tree,Map<Symbol, ReadWriteVisitor.SymbolReadWrite>> CfgBlockState.variableReadWritesPerElementMethods in org.sonar.python.cfg.fixpoint with parameters of type TreeModifier and TypeMethodDescriptionCfgBlockState.getSymbolReadWrites(Tree tree) abstract voidForwardAnalysis.updateProgramState(Tree element, ProgramState programState) -
Uses of Tree in org.sonar.python.metrics
Methods in org.sonar.python.metrics with parameters of type TreeModifier and TypeMethodDescriptionstatic intCognitiveComplexityVisitor.complexity(Tree tree, CognitiveComplexityVisitor.SecondaryLocationConsumer secondaryLocationConsumer) static intComplexityVisitor.complexity(Tree pyTree) -
Uses of Tree in org.sonar.python.project.config
Methods in org.sonar.python.project.config with parameters of type TreeModifier and TypeMethodDescriptionvoidSignatureBasedAwsLambdaHandlersCollector.collect(ProjectConfigurationBuilder configBuilder, Tree rootTree, String packageName) -
Uses of Tree in org.sonar.python.quickfix
Methods in org.sonar.python.quickfix with parameters of type TreeModifier and TypeMethodDescriptionstatic PythonTextEditTextEditUtils.insertAfter(Tree tree, String textToInsert) static PythonTextEditTextEditUtils.insertBefore(Tree tree, String textToInsert) static PythonTextEditTextEditUtils.insertLineAfter(Tree tree, Tree indentReference, String textToInsert) Insert a line with the same offset as the given tree, after the given tree.static PythonTextEditTextEditUtils.insertLineBefore(Tree tree, String textToInsert) Insert a line with the same offset as the given tree, before the given tree.static PythonTextEditstatic PythonTextEditTextEditUtils.removeUntil(Tree start, Tree until) Remove range including the start token until the beginning of the end tree's first token.static PythonTextEditstatic PythonTextEditTextEditUtils.replaceRange(Tree start, Tree end, String replacementText) static List<PythonTextEdit>Shift single statement of a statement list by the given offset. -
Uses of Tree in org.sonar.python.regex
Methods in org.sonar.python.regex with parameters of type TreeModifier and TypeMethodDescription -
Uses of Tree in org.sonar.python.semantic
Methods in org.sonar.python.semantic that return TreeMethods in org.sonar.python.semantic with parameters of type TreeConstructors in org.sonar.python.semantic with parameters of type Tree -
Uses of Tree in org.sonar.python.semantic.v2
Methods in org.sonar.python.semantic.v2 that return TreeModifier and TypeMethodDescriptionScopeV2.root()UsageV2.tree()Returns the value of thetreerecord component.Methods in org.sonar.python.semantic.v2 that return types with arguments of type TreeModifier and TypeMethodDescriptionSymbolTable.scopesByRootTree()Returns the value of thescopesByRootTreerecord component.Methods in org.sonar.python.semantic.v2 with parameters of type TreeConstructors in org.sonar.python.semantic.v2 with parameters of type TreeModifierConstructorDescriptionUsageV2(Tree tree, UsageV2.Kind kind) Creates an instance of aUsageV2record class.Constructor parameters in org.sonar.python.semantic.v2 with type arguments of type TreeModifierConstructorDescriptionReadUsagesVisitor(Map<Tree, ScopeV2> scopesByRootTree) ScopeVisitor(Map<Tree, ScopeV2> scopesByRootTree) SymbolTable(Map<Tree, ScopeV2> scopesByRootTree) Creates an instance of aSymbolTablerecord class.WriteUsagesVisitor(Map<Tree, ScopeV2> scopesByRootTree) -
Uses of Tree in org.sonar.python.semantic.v2.types
Methods in org.sonar.python.semantic.v2.types with parameters of type TreeModifier and TypeMethodDescriptionvoidFlowSensitiveTypeInference.updateProgramState(Tree element, ProgramState programState) -
Uses of Tree in org.sonar.python.tests
Methods in org.sonar.python.tests with parameters of type TreeModifier and TypeMethodDescriptionstatic booleanUnittestUtils.isWithinUnittestTestCase(Tree tree) -
Uses of Tree in org.sonar.python.tree
Classes in org.sonar.python.tree with type parameters of type TreeClasses in org.sonar.python.tree that implement TreeModifier and TypeClassDescriptionclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassEven if decorator is not a statement, it extendsSimpleStatementin order to properly resolve its last token as it's a newline tokenclassclassclassclassDictOrSetLiteralImpl<E extends Tree>classclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassclassstatic classclassclassMethods in org.sonar.python.tree with type parameters of type TreeModifier and TypeMethodDescriptionstatic <T extends Tree>
TTreeUtils.firstAncestorOfClass(Tree tree, Class<T> clazz) TreeUtils.toInstanceOfMapper(Class<T> castToClass) TreeUtils.toOptionalInstanceOf(Class<T> castToClass, Tree tree) TreeUtils.toOptionalInstanceOfMapper(Class<T> castToClass) TreeUtils.toStreamInstanceOfMapper(Class<T> castToClass) Methods in org.sonar.python.tree that return TreeModifier and TypeMethodDescriptionstatic TreeTreeUtils.firstAncestor(Tree tree, Predicate<Tree> predicate) static TreeTreeUtils.firstAncestorOfKind(Tree tree, Tree.Kind... kinds) PyTree.parent()Methods in org.sonar.python.tree that return types with arguments of type TreeModifier and TypeMethodDescriptionPyTree.children()AliasedNameImpl.computeChildren()AnnotatedAssignmentImpl.computeChildren()ArgListImpl.computeChildren()AssertStatementImpl.computeChildren()AssignmentStatementImpl.computeChildren()AwaitExpressionImpl.computeChildren()BinaryExpressionImpl.computeChildren()BreakStatementImpl.computeChildren()CallExpressionImpl.computeChildren()ClassDefImpl.computeChildren()CompoundAssignmentStatementImpl.computeChildren()ComprehensionExpressionImpl.computeChildren()ComprehensionForImpl.computeChildren()ComprehensionIfImpl.computeChildren()ConditionalExpressionImpl.computeChildren()ContinueStatementImpl.computeChildren()DecoratorImpl.computeChildren()DelStatementImpl.computeChildren()DictCompExpressionImpl.computeChildren()DictOrSetLiteralImpl.computeChildren()DottedNameImpl.computeChildren()EllipsisExpressionImpl.computeChildren()ElseClauseImpl.computeChildren()ExceptClauseImpl.computeChildren()ExecStatementImpl.computeChildren()ExpressionListImpl.computeChildren()ExpressionStatementImpl.computeChildren()FileInputImpl.computeChildren()FinallyClauseImpl.computeChildren()ForStatementImpl.computeChildren()FunctionDefImpl.computeChildren()GlobalStatementImpl.computeChildren()IfStatementImpl.computeChildren()ImportFromImpl.computeChildren()ImportNameImpl.computeChildren()InExpressionImpl.computeChildren()IsExpressionImpl.computeChildren()KeyValuePairImpl.computeChildren()LambdaExpressionImpl.computeChildren()ListLiteralImpl.computeChildren()MappingPatternImpl.computeChildren()NameImpl.computeChildren()NoneExpressionImpl.computeChildren()NonlocalStatementImpl.computeChildren()NumericLiteralImpl.computeChildren()ParameterImpl.computeChildren()ParameterListImpl.computeChildren()ParenthesizedExpressionImpl.computeChildren()PassStatementImpl.computeChildren()PrintStatementImpl.computeChildren()QualifiedExpressionImpl.computeChildren()RaiseStatementImpl.computeChildren()RegularArgumentImpl.computeChildren()ReprExpressionImpl.computeChildren()ReturnStatementImpl.computeChildren()SliceExpressionImpl.computeChildren()SliceItemImpl.computeChildren()SliceListImpl.computeChildren()StatementListImpl.computeChildren()StringElementImpl.computeChildren()StringLiteralImpl.computeChildren()SubscriptionExpressionImpl.computeChildren()TokenImpl.computeChildren()TryStatementImpl.computeChildren()TupleImpl.computeChildren()TupleParameterImpl.computeChildren()TypeAnnotationImpl.computeChildren()UnaryExpressionImpl.computeChildren()UnpackingExpressionImpl.computeChildren()WhileStatementImpl.computeChildren()WithStatementImpl.computeChildren()WithStatementImpl.WithItemImpl.computeChildren()YieldExpressionImpl.computeChildren()YieldStatementImpl.computeChildren()TreeUtils.firstChild(Tree tree, Predicate<Tree> filter) static Comparator<Tree>TreeUtils.getTreeByPositionComparator()TreeUtils.groupAssignmentByParentStatementList()TreeUtils.groupAssignmentByParentStatementList()TreeUtils.groupAssignmentByParentStatementList()SliceListImpl.slices()TreeUtils.toInstanceOfMapper(Class<T> castToClass) TreeUtils.toOptionalInstanceOfMapper(Class<T> castToClass) TreeUtils.toStreamInstanceOfMapper(Class<T> castToClass) Methods in org.sonar.python.tree with parameters of type TreeModifier and TypeMethodDescriptionTreeUtils.asyncTokenOfEnclosingFunction(Tree tree) static intTreeUtils.findIndentationSize(Tree tree) static TreeTreeUtils.firstAncestor(Tree tree, Predicate<Tree> predicate) static <T extends Tree>
TTreeUtils.firstAncestorOfClass(Tree tree, Class<T> clazz) static TreeTreeUtils.firstAncestorOfKind(Tree tree, Tree.Kind... kinds) TreeUtils.firstChild(Tree tree, Predicate<Tree> filter) static ClassDefTreeUtils.getEnclosingClassDef(Tree tree) TreeUtils.getSymbolFromTree(Tree tree) static TokenTreeUtils.getTreeSeparatorOrLastToken(Tree tree) Statements can have a separator like semicolon.static booleanTreeUtils.hasDescendant(Tree tree, Predicate<Tree> predicate) static booleanTreeUtils.isBooleanLiteral(Tree tree) static booleanTreeUtils.isFunctionWithGivenDecoratorFQN(Tree tree, String decoratorFQN) static LocationInFileTreeUtils.locationInFile(Tree tree, String fileId) TreeUtils.nonWhitespaceTokens(Tree tree) protected voidvoidPythonTreeMaker.setParents(Tree root) TreeUtils.toOptionalInstanceOf(Class<T> castToClass, Tree tree) static StringTreeUtils.treeToString(Tree tree, boolean renderMultiline) Method parameters in org.sonar.python.tree with type arguments of type TreeModifier and TypeMethodDescriptionstatic TreeTreeUtils.firstAncestor(Tree tree, Predicate<Tree> predicate) TreeUtils.firstChild(Tree tree, Predicate<Tree> filter) static booleanTreeUtils.hasDescendant(Tree tree, Predicate<Tree> predicate) Constructor parameters in org.sonar.python.tree with type arguments of type TreeModifierConstructorDescriptionFormatSpecifierImpl(Token columnToken, List<Tree> fStringMiddles) SliceListImpl(List<Tree> slices, List<Token> separators) StringElementImpl(Token token, List<Tree> fStringMiddles, Token fstringEnd)