Class LocalScope
- java.lang.Object
-
- net.sourceforge.pmd.lang.symboltable.AbstractScope
-
- net.sourceforge.pmd.lang.java.symboltable.AbstractJavaScope
-
- net.sourceforge.pmd.lang.java.symboltable.LocalScope
-
- All Implemented Interfaces:
Scope
public class LocalScope extends AbstractJavaScope
A LocalScope can have variable declarations and class declarations within it.
-
-
Constructor Summary
Constructors Constructor Description LocalScope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDeclaration(NameDeclaration nameDecl)
Set<NameDeclaration>
addNameOccurrence(NameOccurrence occurrence)
Set<NameDeclaration>
findVariableHere(JavaNameOccurrence occurrence)
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
-
-
-
-
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 nameDecl)
- Specified by:
addDeclaration
in interfaceScope
- Overrides:
addDeclaration
in classAbstractJavaScope
-
findVariableHere
public Set<NameDeclaration> findVariableHere(JavaNameOccurrence occurrence)
- Specified by:
findVariableHere
in classAbstractJavaScope
-
-