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 voidaddDeclaration(NameDeclaration nameDecl)Set<NameDeclaration>addNameOccurrence(NameOccurrence occurrence)Set<NameDeclaration>findVariableHere(JavaNameOccurrence occurrence)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
-
-
-
-
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 nameDecl)
- Specified by:
addDeclarationin interfaceScope- Overrides:
addDeclarationin classAbstractJavaScope
-
findVariableHere
public Set<NameDeclaration> findVariableHere(JavaNameOccurrence occurrence)
- Specified by:
findVariableHerein classAbstractJavaScope
-
-