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​(java.lang.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 java.util.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 java.util.Map<VariableNameDeclaration,​java.util.List<net.sourceforge.pmd.lang.symboltable.NameOccurrence>> getVariableDeclarations()
      • getMethodDeclarations

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

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

        public ClassScope getEnclosingClassScope()
      • getClassName

        public java.lang.String getClassName()
      • findVariableHere

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object