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 void
addDeclaration(NameDeclaration variableDecl)
Set<NameDeclaration>
addNameOccurrence(NameOccurrence occurrence)
Set<NameDeclaration>
findVariableHere(JavaNameOccurrence occurrence)
String
getName()
Map<VariableNameDeclaration,List<NameOccurrence>>
getVariableDeclarations()
String
toString()
-
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:
addNameOccurrence
in interfaceScope
- Overrides:
addNameOccurrence
in classAbstractScope
-
addDeclaration
public void addDeclaration(NameDeclaration variableDecl)
- Specified by:
addDeclaration
in interfaceScope
- Overrides:
addDeclaration
in classAbstractJavaScope
-
findVariableHere
public Set<NameDeclaration> findVariableHere(JavaNameOccurrence occurrence)
- Specified by:
findVariableHere
in classAbstractJavaScope
-
getName
public String getName()
-
-