Class ClassScope

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.symboltable.Scope

    public class ClassScope
    extends net.sourceforge.pmd.lang.symboltable.AbstractScope
    • Constructor Detail

      • ClassScope

        public ClassScope​(String className)
      • ClassScope

        public ClassScope()
        This is only for anonymous inner classes.

        FIXME - should have name like Foo$1, not Anonymous$1 to get this working right, the parent scope needs to be passed in when instantiating a ClassScope

    • Method Detail

      • addDeclaration

        public void addDeclaration​(net.sourceforge.pmd.lang.symboltable.NameDeclaration declaration)
        Specified by:
        addDeclaration in interface net.sourceforge.pmd.lang.symboltable.Scope
        Overrides:
        addDeclaration in class net.sourceforge.pmd.lang.symboltable.AbstractScope
      • addNameOccurrence

        public Set<net.sourceforge.pmd.lang.symboltable.NameDeclaration> addNameOccurrence​(net.sourceforge.pmd.lang.symboltable.NameOccurrence occ)
        Specified by:
        addNameOccurrence in interface net.sourceforge.pmd.lang.symboltable.Scope
        Overrides:
        addNameOccurrence in class net.sourceforge.pmd.lang.symboltable.AbstractScope
      • getVariableDeclarations

        public Map<VariableNameDeclaration,​List<net.sourceforge.pmd.lang.symboltable.NameOccurrence>> getVariableDeclarations()
      • getMethodDeclarations

        public Map<MethodNameDeclaration,​List<net.sourceforge.pmd.lang.symboltable.NameOccurrence>> getMethodDeclarations()
      • getClassDeclarations

        public Map<ClassNameDeclaration,​List<net.sourceforge.pmd.lang.symboltable.NameOccurrence>> getClassDeclarations()
      • getEnclosingClassScope

        public ClassScope getEnclosingClassScope()
      • getClassName

        public String getClassName()
      • findVariableHere

        protected Set<net.sourceforge.pmd.lang.symboltable.NameDeclaration> findVariableHere​(PLSQLNameOccurrence occurrence)