Search in sources :

Example 56 with MethodTree

use of com.sun.source.tree.MethodTree in project checker-framework by typetools.

the class TypesIntoElements method store.

/**
 * The entry point.
 *
 * @param processingEnv the environment
 * @param atypeFactory the type factory
 * @param tree the ClassTree to process
 */
public static void store(ProcessingEnvironment processingEnv, AnnotatedTypeFactory atypeFactory, ClassTree tree) {
    Symbol.ClassSymbol csym = (Symbol.ClassSymbol) TreeUtils.elementFromDeclaration(tree);
    Types types = processingEnv.getTypeUtils();
    storeTypeParameters(processingEnv, types, atypeFactory, tree.getTypeParameters(), csym);
    for (Tree mem : tree.getMembers()) {
        if (mem.getKind() == Tree.Kind.METHOD) {
            storeMethod(processingEnv, types, atypeFactory, (MethodTree) mem);
        } else if (mem.getKind() == Tree.Kind.VARIABLE) {
            storeVariable(processingEnv, types, atypeFactory, (VariableTree) mem);
        } else {
        // System.out.println("Unhandled member tree: " + mem);
        }
    }
}
Also used : Types(javax.lang.model.util.Types) MethodSymbol(com.sun.tools.javac.code.Symbol.MethodSymbol) VarSymbol(com.sun.tools.javac.code.Symbol.VarSymbol) Symbol(com.sun.tools.javac.code.Symbol) VariableTree(com.sun.source.tree.VariableTree) MethodTree(com.sun.source.tree.MethodTree) VariableTree(com.sun.source.tree.VariableTree) TypeParameterTree(com.sun.source.tree.TypeParameterTree) Tree(com.sun.source.tree.Tree) ClassTree(com.sun.source.tree.ClassTree) JCTree(com.sun.tools.javac.tree.JCTree)

Example 57 with MethodTree

use of com.sun.source.tree.MethodTree in project checker-framework by typetools.

the class CFAbstractTransfer method initialStore.

/**
 * The initial store maps method formal parameters to their currently most refined type.
 */
@Override
public S initialStore(UnderlyingAST underlyingAST, List<LocalVariableNode> parameters) {
    if (underlyingAST.getKind() != UnderlyingAST.Kind.LAMBDA && underlyingAST.getKind() != UnderlyingAST.Kind.METHOD) {
        if (fixedInitialStore != null) {
            return fixedInitialStore;
        } else {
            return analysis.createEmptyStore(sequentialSemantics);
        }
    }
    S store;
    if (underlyingAST.getKind() == UnderlyingAST.Kind.METHOD) {
        if (fixedInitialStore != null) {
            // copy knowledge
            store = analysis.createCopiedStore(fixedInitialStore);
        } else {
            store = analysis.createEmptyStore(sequentialSemantics);
        }
        AnnotatedTypeFactory factory = analysis.getTypeFactory();
        for (LocalVariableNode p : parameters) {
            AnnotatedTypeMirror anno = factory.getAnnotatedType(p.getElement());
            store.initializeMethodParameter(p, analysis.createAbstractValue(anno));
        }
        // add properties known through precondition
        CFGMethod method = (CFGMethod) underlyingAST;
        MethodTree methodDeclTree = method.getMethod();
        ExecutableElement methodElem = TreeUtils.elementFromDeclaration(methodDeclTree);
        addInformationFromPreconditions(store, factory, method, methodDeclTree, methodElem);
        addInitialFieldValues(store, method.getClassTree(), methodDeclTree);
        addFinalLocalValues(store, methodElem);
        if (shouldPerformWholeProgramInference(methodDeclTree, methodElem)) {
            Map<AnnotatedDeclaredType, ExecutableElement> overriddenMethods = AnnotatedTypes.overriddenMethods(analysis.atypeFactory.getElementUtils(), analysis.atypeFactory, methodElem);
            for (Map.Entry<AnnotatedDeclaredType, ExecutableElement> pair : overriddenMethods.entrySet()) {
                AnnotatedExecutableType overriddenMethod = AnnotatedTypes.asMemberOf(analysis.atypeFactory.getProcessingEnv().getTypeUtils(), analysis.atypeFactory, pair.getKey(), pair.getValue());
                // Infers parameter and receiver types of the method based
                // on the overridden method.
                analysis.atypeFactory.getWholeProgramInference().updateFromOverride(methodDeclTree, methodElem, overriddenMethod);
            }
        }
    } else if (underlyingAST.getKind() == UnderlyingAST.Kind.LAMBDA) {
        // Create a copy and keep only the field values (nothing else applies).
        store = analysis.createCopiedStore(fixedInitialStore);
        // Allow that local variables are retained; they are effectively final,
        // otherwise Java wouldn't allow access from within the lambda.
        // TODO: what about the other information? Can code further down be simplified?
        // store.localVariableValues.clear();
        store.classValues.clear();
        store.arrayValues.clear();
        store.methodValues.clear();
        AnnotatedTypeFactory factory = analysis.getTypeFactory();
        for (LocalVariableNode p : parameters) {
            AnnotatedTypeMirror anno = factory.getAnnotatedType(p.getElement());
            store.initializeMethodParameter(p, analysis.createAbstractValue(anno));
        }
        CFGLambda lambda = (CFGLambda) underlyingAST;
        // used in == tests
        @SuppressWarnings("interning:assignment") @InternedDistinct Tree enclosingTree = TreePathUtil.enclosingOfKind(factory.getPath(lambda.getLambdaTree()), new HashSet<>(Arrays.asList(Tree.Kind.METHOD, // Tree.Kind for which TreeUtils.isClassTree is true
        Tree.Kind.CLASS, Tree.Kind.INTERFACE, Tree.Kind.ANNOTATION_TYPE, Tree.Kind.ENUM)));
        Element enclosingElement = null;
        if (enclosingTree.getKind() == Tree.Kind.METHOD) {
            // If it is in an initializer, we need to use locals from the initializer.
            enclosingElement = TreeUtils.elementFromTree(enclosingTree);
        } else if (TreeUtils.isClassTree(enclosingTree)) {
            // Try to find an enclosing initializer block.
            // Would love to know if there was a better way.
            // Find any enclosing element of the lambda (using trees).
            // Then go up the elements to find an initializer element (which can't be found with the
            // tree).
            TreePath loopTree = factory.getPath(lambda.getLambdaTree()).getParentPath();
            Element anEnclosingElement = null;
            while (loopTree.getLeaf() != enclosingTree) {
                Element sym = TreeUtils.elementFromTree(loopTree.getLeaf());
                if (sym != null) {
                    anEnclosingElement = sym;
                    break;
                }
                loopTree = loopTree.getParentPath();
            }
            while (anEnclosingElement != null && !anEnclosingElement.equals(TreeUtils.elementFromTree(enclosingTree))) {
                if (anEnclosingElement.getKind() == ElementKind.INSTANCE_INIT || anEnclosingElement.getKind() == ElementKind.STATIC_INIT) {
                    enclosingElement = anEnclosingElement;
                    break;
                }
                anEnclosingElement = anEnclosingElement.getEnclosingElement();
            }
        }
        if (enclosingElement != null) {
            addFinalLocalValues(store, enclosingElement);
        }
        // We want the initialization stuff, but need to throw out any refinements.
        Map<FieldAccess, V> fieldValuesClone = new HashMap<>(store.fieldValues);
        for (Map.Entry<FieldAccess, V> fieldValue : fieldValuesClone.entrySet()) {
            AnnotatedTypeMirror declaredType = factory.getAnnotatedType(fieldValue.getKey().getField());
            V lubbedValue = analysis.createAbstractValue(declaredType).leastUpperBound(fieldValue.getValue());
            store.fieldValues.put(fieldValue.getKey(), lubbedValue);
        }
    } else {
        assert false : "Unexpected tree: " + underlyingAST;
        store = null;
    }
    return store;
}
Also used : CFGMethod(org.checkerframework.dataflow.cfg.UnderlyingAST.CFGMethod) MethodTree(com.sun.source.tree.MethodTree) ExecutableElement(javax.lang.model.element.ExecutableElement) TypeElement(javax.lang.model.element.TypeElement) Element(javax.lang.model.element.Element) VariableElement(javax.lang.model.element.VariableElement) ExecutableElement(javax.lang.model.element.ExecutableElement) AnnotatedTypeMirror(org.checkerframework.framework.type.AnnotatedTypeMirror) LocalVariableNode(org.checkerframework.dataflow.cfg.node.LocalVariableNode) AnnotatedExecutableType(org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedExecutableType) TreePath(com.sun.source.util.TreePath) AnnotatedDeclaredType(org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedDeclaredType) GenericAnnotatedTypeFactory(org.checkerframework.framework.type.GenericAnnotatedTypeFactory) AnnotatedTypeFactory(org.checkerframework.framework.type.AnnotatedTypeFactory) MethodTree(com.sun.source.tree.MethodTree) Tree(com.sun.source.tree.Tree) ClassTree(com.sun.source.tree.ClassTree) ExpressionTree(com.sun.source.tree.ExpressionTree) CFGLambda(org.checkerframework.dataflow.cfg.UnderlyingAST.CFGLambda) Map(java.util.Map) HashMap(java.util.HashMap) HashSet(java.util.HashSet)

Example 58 with MethodTree

use of com.sun.source.tree.MethodTree in project checker-framework by typetools.

the class CFAbstractTransfer method addInformationFromPreconditions.

/**
 * Add the information from all the preconditions of a method to the initial store in the method
 * body.
 *
 * @param initialStore the initial store for the method body
 * @param factory the type factory
 * @param methodAst the AST for a method declaration
 * @param methodDeclTree the declaration of the method; is a field of {@code methodAst}
 * @param methodElement the element for the method
 */
protected void addInformationFromPreconditions(S initialStore, AnnotatedTypeFactory factory, CFGMethod methodAst, MethodTree methodDeclTree, ExecutableElement methodElement) {
    ContractsFromMethod contractsUtils = analysis.atypeFactory.getContractsFromMethod();
    Set<Precondition> preconditions = contractsUtils.getPreconditions(methodElement);
    StringToJavaExpression stringToJavaExpr = stringExpr -> StringToJavaExpression.atMethodBody(stringExpr, methodDeclTree, analysis.checker);
    for (Precondition p : preconditions) {
        String stringExpr = p.expressionString;
        AnnotationMirror annotation = p.viewpointAdaptDependentTypeAnnotation(analysis.atypeFactory, stringToJavaExpr, /*errorTree=*/
        null);
        JavaExpression exprJe;
        try {
            // TODO: currently, these expressions are parsed at the declaration (i.e. here) and for
            // every use. this could be optimized to store the result the first time.
            // (same for other annotations)
            exprJe = StringToJavaExpression.atMethodBody(stringExpr, methodDeclTree, analysis.checker);
        } catch (JavaExpressionParseException e) {
            // Errors are reported by BaseTypeVisitor.checkContractsAtMethodDeclaration().
            continue;
        }
        initialStore.insertValuePermitNondeterministic(exprJe, annotation);
    }
}
Also used : NodeUtils(org.checkerframework.dataflow.util.NodeUtils) Arrays(java.util.Arrays) TransferResult(org.checkerframework.dataflow.analysis.TransferResult) Modifier(javax.lang.model.element.Modifier) ForwardTransferFunction(org.checkerframework.dataflow.analysis.ForwardTransferFunction) TypeElement(javax.lang.model.element.TypeElement) ClassSymbol(com.sun.tools.javac.code.Symbol.ClassSymbol) StringConversionNode(org.checkerframework.dataflow.cfg.node.StringConversionNode) GenericAnnotatedTypeFactory(org.checkerframework.framework.type.GenericAnnotatedTypeFactory) Map(java.util.Map) WideningConversionNode(org.checkerframework.dataflow.cfg.node.WideningConversionNode) InternedDistinct(org.checkerframework.checker.interning.qual.InternedDistinct) AnnotatedExecutableType(org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedExecutableType) ClassNameNode(org.checkerframework.dataflow.cfg.node.ClassNameNode) TreePath(com.sun.source.util.TreePath) ObjectCreationNode(org.checkerframework.dataflow.cfg.node.ObjectCreationNode) UnderlyingAST(org.checkerframework.dataflow.cfg.UnderlyingAST) AbstractNodeVisitor(org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor) Set(java.util.Set) Element(javax.lang.model.element.Element) Contract(org.checkerframework.framework.util.Contract) TreeUtils(org.checkerframework.javacutil.TreeUtils) CFGMethod(org.checkerframework.dataflow.cfg.UnderlyingAST.CFGMethod) LocalVariableNode(org.checkerframework.dataflow.cfg.node.LocalVariableNode) NarrowingConversionNode(org.checkerframework.dataflow.cfg.node.NarrowingConversionNode) List(java.util.List) LocalVariable(org.checkerframework.dataflow.expression.LocalVariable) AnnotatedDeclaredType(org.checkerframework.framework.type.AnnotatedTypeMirror.AnnotatedDeclaredType) EqualToNode(org.checkerframework.dataflow.cfg.node.EqualToNode) AnnotatedTypes(org.checkerframework.framework.util.AnnotatedTypes) CFGLambda(org.checkerframework.dataflow.cfg.UnderlyingAST.CFGLambda) VariableDeclarationNode(org.checkerframework.dataflow.cfg.node.VariableDeclarationNode) RegularTransferResult(org.checkerframework.dataflow.analysis.RegularTransferResult) TernaryExpressionNode(org.checkerframework.dataflow.cfg.node.TernaryExpressionNode) Postcondition(org.checkerframework.framework.util.Contract.Postcondition) MethodTree(com.sun.source.tree.MethodTree) ConditionalPostcondition(org.checkerframework.framework.util.Contract.ConditionalPostcondition) VariableElement(javax.lang.model.element.VariableElement) InstanceOfNode(org.checkerframework.dataflow.cfg.node.InstanceOfNode) HashMap(java.util.HashMap) ThisNode(org.checkerframework.dataflow.cfg.node.ThisNode) ArrayList(java.util.ArrayList) ConditionalTransferResult(org.checkerframework.dataflow.analysis.ConditionalTransferResult) AssignmentNode(org.checkerframework.dataflow.cfg.node.AssignmentNode) CaseNode(org.checkerframework.dataflow.cfg.node.CaseNode) HashSet(java.util.HashSet) LambdaResultExpressionNode(org.checkerframework.dataflow.cfg.node.LambdaResultExpressionNode) Precondition(org.checkerframework.framework.util.Contract.Precondition) FieldAccessNode(org.checkerframework.dataflow.cfg.node.FieldAccessNode) TreePathUtil(org.checkerframework.javacutil.TreePathUtil) SwitchExpressionNode(org.checkerframework.dataflow.cfg.node.SwitchExpressionNode) NotEqualNode(org.checkerframework.dataflow.cfg.node.NotEqualNode) Tree(com.sun.source.tree.Tree) ClassTree(com.sun.source.tree.ClassTree) Nullable(org.checkerframework.checker.nullness.qual.Nullable) FieldAccess(org.checkerframework.dataflow.expression.FieldAccess) TransferInput(org.checkerframework.dataflow.analysis.TransferInput) AnnotatedTypeMirror(org.checkerframework.framework.type.AnnotatedTypeMirror) ArrayAccessNode(org.checkerframework.dataflow.cfg.node.ArrayAccessNode) ConditionalNotNode(org.checkerframework.dataflow.cfg.node.ConditionalNotNode) JavaExpressionParseException(org.checkerframework.framework.util.JavaExpressionParseUtil.JavaExpressionParseException) ElementKind(javax.lang.model.element.ElementKind) ExpressionTree(com.sun.source.tree.ExpressionTree) ExecutableElement(javax.lang.model.element.ExecutableElement) ReturnNode(org.checkerframework.dataflow.cfg.node.ReturnNode) JavaExpression(org.checkerframework.dataflow.expression.JavaExpression) FieldInitialValue(org.checkerframework.framework.flow.CFAbstractAnalysis.FieldInitialValue) MethodInvocationNode(org.checkerframework.dataflow.cfg.node.MethodInvocationNode) AnnotationMirror(javax.lang.model.element.AnnotationMirror) StringToJavaExpression(org.checkerframework.framework.util.StringToJavaExpression) AnnotatedTypeFactory(org.checkerframework.framework.type.AnnotatedTypeFactory) StringConcatenateAssignmentNode(org.checkerframework.dataflow.cfg.node.StringConcatenateAssignmentNode) TypeMirror(javax.lang.model.type.TypeMirror) Collections(java.util.Collections) ElementUtils(org.checkerframework.javacutil.ElementUtils) Node(org.checkerframework.dataflow.cfg.node.Node) ContractsFromMethod(org.checkerframework.framework.util.ContractsFromMethod) AnnotationMirror(javax.lang.model.element.AnnotationMirror) JavaExpression(org.checkerframework.dataflow.expression.JavaExpression) StringToJavaExpression(org.checkerframework.framework.util.StringToJavaExpression) Precondition(org.checkerframework.framework.util.Contract.Precondition) StringToJavaExpression(org.checkerframework.framework.util.StringToJavaExpression) JavaExpressionParseException(org.checkerframework.framework.util.JavaExpressionParseUtil.JavaExpressionParseException) ContractsFromMethod(org.checkerframework.framework.util.ContractsFromMethod)

Example 59 with MethodTree

use of com.sun.source.tree.MethodTree in project checker-framework by typetools.

the class ExpectedTreesVisitor method visitClass.

@Override
public Void visitClass(ClassTree tree, Void p) {
    defaultAction(tree);
    scan(tree.getModifiers(), p);
    scan(tree.getTypeParameters(), p);
    scan(tree.getExtendsClause(), p);
    scan(tree.getImplementsClause(), p);
    if (tree.getKind() == Tree.Kind.ENUM) {
        // instance of an enum.
        for (Tree member : tree.getMembers()) {
            member.accept(this, p);
            if (member.getKind() != Tree.Kind.VARIABLE) {
                continue;
            }
            VariableTree variable = (VariableTree) member;
            ExpressionTree initializer = variable.getInitializer();
            if (initializer == null || initializer.getKind() != Tree.Kind.NEW_CLASS) {
                continue;
            }
            NewClassTree constructor = (NewClassTree) initializer;
            if (constructor.getIdentifier().getKind() != Tree.Kind.IDENTIFIER) {
                continue;
            }
            IdentifierTree name = (IdentifierTree) constructor.getIdentifier();
            if (name.getName().contentEquals(tree.getSimpleName())) {
                trees.remove(variable.getType());
                trees.remove(constructor);
                trees.remove(constructor.getIdentifier());
            }
        }
    // RECORD was added in Java 14, so use string comparison to be JDK 8,11 compatible:
    } else if (tree.getKind().name().equals("RECORD")) {
        // A record like:
        // record MyRec(String myField) {}
        // will be expanded by javac to:
        // class MyRec {
        // MyRec(String myField) {
        // super();
        // }
        // private final String myField;
        // }
        // So the constructor and the field declarations have no matching trees in the JavaParser
        // node, and we must remove those trees (and their subtrees) from the `trees` field.
        TreeScannerWithDefaults removeAllVisitor = new TreeScannerWithDefaults() {

            @Override
            public void defaultAction(Tree node) {
                trees.remove(node);
            }
        };
        for (Tree member : tree.getMembers()) {
            scan(member, p);
            if (TreeUtils.isAutoGeneratedRecordMember(member)) {
                member.accept(removeAllVisitor, null);
            } else {
                // the parameters.  These trees also don't have a match:
                if (member.getKind() == Tree.Kind.METHOD) {
                    MethodTree methodTree = (MethodTree) member;
                    if (TreeUtils.isCompactCanonicalRecordConstructor(methodTree)) {
                        for (VariableTree canonicalParameter : methodTree.getParameters()) {
                            canonicalParameter.accept(removeAllVisitor, null);
                        }
                    }
                }
            }
        }
    } else {
        scan(tree.getMembers(), p);
    }
    return null;
}
Also used : MethodTree(com.sun.source.tree.MethodTree) VariableTree(com.sun.source.tree.VariableTree) AnnotationTree(com.sun.source.tree.AnnotationTree) MethodTree(com.sun.source.tree.MethodTree) VariableTree(com.sun.source.tree.VariableTree) AnnotatedTypeTree(com.sun.source.tree.AnnotatedTypeTree) MethodInvocationTree(com.sun.source.tree.MethodInvocationTree) NewClassTree(com.sun.source.tree.NewClassTree) LambdaExpressionTree(com.sun.source.tree.LambdaExpressionTree) IdentifierTree(com.sun.source.tree.IdentifierTree) NewArrayTree(com.sun.source.tree.NewArrayTree) ImportTree(com.sun.source.tree.ImportTree) Tree(com.sun.source.tree.Tree) ForLoopTree(com.sun.source.tree.ForLoopTree) ClassTree(com.sun.source.tree.ClassTree) IfTree(com.sun.source.tree.IfTree) ExpressionTree(com.sun.source.tree.ExpressionTree) MemberSelectTree(com.sun.source.tree.MemberSelectTree) SwitchTree(com.sun.source.tree.SwitchTree) ExpressionStatementTree(com.sun.source.tree.ExpressionStatementTree) DoWhileLoopTree(com.sun.source.tree.DoWhileLoopTree) SynchronizedTree(com.sun.source.tree.SynchronizedTree) StatementTree(com.sun.source.tree.StatementTree) ModifiersTree(com.sun.source.tree.ModifiersTree) WhileLoopTree(com.sun.source.tree.WhileLoopTree) LambdaExpressionTree(com.sun.source.tree.LambdaExpressionTree) ExpressionTree(com.sun.source.tree.ExpressionTree) IdentifierTree(com.sun.source.tree.IdentifierTree) NewClassTree(com.sun.source.tree.NewClassTree)

Example 60 with MethodTree

use of com.sun.source.tree.MethodTree in project checker-framework by typetools.

the class ExpectedTreesVisitor method visitNewClass.

@Override
public Void visitNewClass(NewClassTree tree, Void p) {
    defaultAction(tree);
    if (tree.getEnclosingExpression() != null) {
        tree.getEnclosingExpression().accept(this, p);
    }
    tree.getIdentifier().accept(this, p);
    for (Tree typeArgument : tree.getTypeArguments()) {
        typeArgument.accept(this, p);
    }
    for (Tree arg : tree.getTypeArguments()) {
        arg.accept(this, p);
    }
    if (tree.getClassBody() == null) {
        return null;
    }
    // Anonymous class bodies require special handling. There isn't a corresponding JavaParser
    // node, and synthetic constructors must be skipped.
    ClassTree body = tree.getClassBody();
    scan(body.getModifiers(), p);
    scan(body.getTypeParameters(), p);
    scan(body.getImplementsClause(), p);
    for (Tree member : body.getMembers()) {
        // Constructors cannot be declared in an anonymous class, so don't add them.
        if (member.getKind() == Tree.Kind.METHOD) {
            MethodTree methodTree = (MethodTree) member;
            if (methodTree.getName().contentEquals("<init>")) {
                continue;
            }
        }
        member.accept(this, p);
    }
    return null;
}
Also used : MethodTree(com.sun.source.tree.MethodTree) NewClassTree(com.sun.source.tree.NewClassTree) ClassTree(com.sun.source.tree.ClassTree) AnnotationTree(com.sun.source.tree.AnnotationTree) MethodTree(com.sun.source.tree.MethodTree) VariableTree(com.sun.source.tree.VariableTree) AnnotatedTypeTree(com.sun.source.tree.AnnotatedTypeTree) MethodInvocationTree(com.sun.source.tree.MethodInvocationTree) NewClassTree(com.sun.source.tree.NewClassTree) LambdaExpressionTree(com.sun.source.tree.LambdaExpressionTree) IdentifierTree(com.sun.source.tree.IdentifierTree) NewArrayTree(com.sun.source.tree.NewArrayTree) ImportTree(com.sun.source.tree.ImportTree) Tree(com.sun.source.tree.Tree) ForLoopTree(com.sun.source.tree.ForLoopTree) ClassTree(com.sun.source.tree.ClassTree) IfTree(com.sun.source.tree.IfTree) ExpressionTree(com.sun.source.tree.ExpressionTree) MemberSelectTree(com.sun.source.tree.MemberSelectTree) SwitchTree(com.sun.source.tree.SwitchTree) ExpressionStatementTree(com.sun.source.tree.ExpressionStatementTree) DoWhileLoopTree(com.sun.source.tree.DoWhileLoopTree) SynchronizedTree(com.sun.source.tree.SynchronizedTree) StatementTree(com.sun.source.tree.StatementTree) ModifiersTree(com.sun.source.tree.ModifiersTree) WhileLoopTree(com.sun.source.tree.WhileLoopTree)

Aggregations

MethodTree (com.sun.source.tree.MethodTree)127 ClassTree (com.sun.source.tree.ClassTree)66 Tree (com.sun.source.tree.Tree)65 VariableTree (com.sun.source.tree.VariableTree)58 ExpressionTree (com.sun.source.tree.ExpressionTree)54 MethodInvocationTree (com.sun.source.tree.MethodInvocationTree)43 ExecutableElement (javax.lang.model.element.ExecutableElement)39 NewClassTree (com.sun.source.tree.NewClassTree)38 TreePath (com.sun.source.util.TreePath)33 LambdaExpressionTree (com.sun.source.tree.LambdaExpressionTree)32 MemberSelectTree (com.sun.source.tree.MemberSelectTree)28 AnnotationTree (com.sun.source.tree.AnnotationTree)25 IdentifierTree (com.sun.source.tree.IdentifierTree)25 AnnotatedTypeMirror (org.checkerframework.framework.type.AnnotatedTypeMirror)23 ReturnTree (com.sun.source.tree.ReturnTree)22 MethodSymbol (com.sun.tools.javac.code.Symbol.MethodSymbol)22 ArrayList (java.util.ArrayList)22 TypeElement (javax.lang.model.element.TypeElement)21 AssignmentTree (com.sun.source.tree.AssignmentTree)20 ConditionalExpressionTree (com.sun.source.tree.ConditionalExpressionTree)20