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 Detail

      • MethodScope

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

      • getVariableDeclarations

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

        public 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 String getName()