Class CanBeStaticAnalyzer


public class CanBeStaticAnalyzer
Analyzes trees for references to their enclosing instance.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  CanBeStaticAnalyzer.CanBeStaticResult
    Stores the result of a can-be-static query.
  • Method Summary

    Modifier and Type Method Description
    static CanBeStaticAnalyzer.CanBeStaticResult canBeStaticResult​(com.sun.source.tree.Tree tree, owner, VisitorState state)  
    static boolean referencesOuter​(com.sun.source.tree.Tree tree, owner, VisitorState state)
    Returns true if the tree references its enclosing class.
    void visitAnnotation​( tree)  
    void visitIdent​( tree)  
    void visitNewClass​( tree)  
    void visitReference​( tree)  
    void visitSelect​( tree)  

    Methods inherited from class

    scan, scan, visitAnnotatedType, visitApply, visitAssert, visitAssign, visitAssignop, visitBinary, visitBindingPattern, visitBlock, visitBreak, visitCase, visitCatch, visitClassDef, visitConditional, visitContinue, visitDoLoop, visitErroneous, visitExec, visitExports, visitForeachLoop, visitForLoop, visitIf, visitImport, visitIndexed, visitLabelled, visitLambda, visitLetExpr, visitLiteral, visitMethodDef, visitModifiers, visitModuleDef, visitNewArray, visitOpens, visitPackageDef, visitParens, visitProvides, visitRequires, visitReturn, visitSkip, visitSwitch, visitSwitchExpression, visitSynchronized, visitThrow, visitTopLevel, visitTree, visitTry, visitTypeApply, visitTypeArray, visitTypeBoundKind, visitTypeCast, visitTypeIdent, visitTypeIntersection, visitTypeParameter, visitTypeTest, visitTypeUnion, visitUnary, visitUses, visitVarDef, visitWhileLoop, visitWildcard, visitYield

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • referencesOuter

      public static boolean referencesOuter​(com.sun.source.tree.Tree tree, owner, VisitorState state)
      Returns true if the tree references its enclosing class.
    • canBeStaticResult

      public static CanBeStaticAnalyzer.CanBeStaticResult canBeStaticResult​(com.sun.source.tree.Tree tree, owner, VisitorState state)
    • visitIdent

      public void visitIdent​( tree)
      visitIdent in class
    • visitSelect

      public void visitSelect​( tree)
      visitSelect in class
    • visitNewClass

      public void visitNewClass​( tree)
      visitNewClass in class
    • visitReference

      public void visitReference​( tree)
      visitReference in class
    • visitAnnotation

      public void visitAnnotation​( tree)
      visitAnnotation in class