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:
net.sourceforge.pmd.lang.symboltable.Scope
public class MethodScope extends AbstractJavaScope
A Method Scope can have variable declarations and class declarations within it.
-
-
Constructor Summary
Constructors Constructor Description MethodScope(net.sourceforge.pmd.lang.ast.Node node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDeclaration(net.sourceforge.pmd.lang.symboltable.NameDeclaration variableDecl)
Set<net.sourceforge.pmd.lang.symboltable.NameDeclaration>
addNameOccurrence(net.sourceforge.pmd.lang.symboltable.NameOccurrence occurrence)
Set<net.sourceforge.pmd.lang.symboltable.NameDeclaration>
findVariableHere(JavaNameOccurrence occurrence)
String
getName()
Map<VariableNameDeclaration,List<net.sourceforge.pmd.lang.symboltable.NameOccurrence>>
getVariableDeclarations()
String
toString()
-
Methods inherited from class net.sourceforge.pmd.lang.java.symboltable.AbstractJavaScope
checkForDuplicatedNameDeclaration, contains, glomNames
-
-
-
-
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 interfacenet.sourceforge.pmd.lang.symboltable.Scope
- Overrides:
addNameOccurrence
in classnet.sourceforge.pmd.lang.symboltable.AbstractScope
-
addDeclaration
public void addDeclaration(net.sourceforge.pmd.lang.symboltable.NameDeclaration variableDecl)
- Specified by:
addDeclaration
in interfacenet.sourceforge.pmd.lang.symboltable.Scope
- Overrides:
addDeclaration
in classAbstractJavaScope
-
findVariableHere
public Set<net.sourceforge.pmd.lang.symboltable.NameDeclaration> findVariableHere(JavaNameOccurrence occurrence)
- Specified by:
findVariableHere
in classAbstractJavaScope
-
getName
public String getName()
-
-