Class MethodScope
- java.lang.Object
-
- net.sourceforge.pmd.lang.symboltable.AbstractScope
-
- net.sourceforge.pmd.lang.java.symboltable.AbstractJavaScope
-
- net.sourceforge.pmd.lang.java.symboltable.MethodScope
-
- All Implemented Interfaces:
Scope
public class MethodScope extends AbstractJavaScope
A Method Scope can have variable declarations and class declarations within it.
-
-
Constructor Summary
Constructors Constructor Description MethodScope(Node node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDeclaration(NameDeclaration variableDecl)Set<NameDeclaration>addNameOccurrence(NameOccurrence occurrence)Set<NameDeclaration>findVariableHere(JavaNameOccurrence occurrence)StringgetName()Map<VariableNameDeclaration,List<NameOccurrence>>getVariableDeclarations()StringtoString()-
Methods inherited from class net.sourceforge.pmd.lang.java.symboltable.AbstractJavaScope
checkForDuplicatedNameDeclaration, contains, glomNames
-
Methods inherited from class net.sourceforge.pmd.lang.symboltable.AbstractScope
getDeclarations, getDeclarations, getEnclosingScope, getParent, setParent
-
-
-
-
Constructor Detail
-
MethodScope
public MethodScope(Node node)
-
-
Method Detail
-
getVariableDeclarations
public Map<VariableNameDeclaration,List<NameOccurrence>> getVariableDeclarations()
-
addNameOccurrence
public Set<NameDeclaration> addNameOccurrence(NameOccurrence occurrence)
- Specified by:
addNameOccurrencein interfaceScope- Overrides:
addNameOccurrencein classAbstractScope
-
addDeclaration
public void addDeclaration(NameDeclaration variableDecl)
- Specified by:
addDeclarationin interfaceScope- Overrides:
addDeclarationin classAbstractJavaScope
-
findVariableHere
public Set<NameDeclaration> findVariableHere(JavaNameOccurrence occurrence)
- Specified by:
findVariableHerein classAbstractJavaScope
-
getName
public String getName()
-
-