Class MethodScope

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

    public class MethodScope
    extends AbstractJavaScope
    A Method Scope can have variable declarations and class declarations within it.
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodScope​(net.sourceforge.pmd.lang.ast.Node node)  
    • Constructor Detail

      • MethodScope

        public MethodScope​(net.sourceforge.pmd.lang.ast.Node node)
    • Method Detail

      • getVariableDeclarations

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

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

        public void addDeclaration​(net.sourceforge.pmd.lang.symboltable.NameDeclaration variableDecl)
        Specified by:
        addDeclaration in interface net.sourceforge.pmd.lang.symboltable.Scope
        Overrides:
        addDeclaration in class AbstractJavaScope
      • getName

        public java.lang.String getName()
      • toString

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