net.sourceforge.pmd.symboltable

Class DummyScope

public class DummyScope extends Object implements Scope

Implementation of Scope for source types that are simpler than java sources. It implements the methods only when necessary not to break at runtime when Violations are handled.

Author: pieter_van_raemdonck - Application Engineers NV/SA - www.ae.be

Method Summary
voidaddDeclaration(ClassNameDeclaration decl)
voidaddDeclaration(VariableNameDeclaration decl)
voidaddDeclaration(MethodNameDeclaration decl)
NameDeclarationaddVariableNameOccurrence(NameOccurrence occ)
booleancontains(NameOccurrence occ)
MapgetClassDeclarations()
ClassScopegetEnclosingClassScope()
MethodScopegetEnclosingMethodScope()
SourceFileScopegetEnclosingSourceFileScope()
ScopegetParent()
MapgetVariableDeclarations()
voidsetParent(Scope parent)

Method Detail

addDeclaration

public void addDeclaration(ClassNameDeclaration decl)

addDeclaration

public void addDeclaration(VariableNameDeclaration decl)

addDeclaration

public void addDeclaration(MethodNameDeclaration decl)

addVariableNameOccurrence

public NameDeclaration addVariableNameOccurrence(NameOccurrence occ)

contains

public boolean contains(NameOccurrence occ)

getClassDeclarations

public Map getClassDeclarations()

getEnclosingClassScope

public ClassScope getEnclosingClassScope()

getEnclosingMethodScope

public MethodScope getEnclosingMethodScope()

getEnclosingSourceFileScope

public SourceFileScope getEnclosingSourceFileScope()

getParent

public Scope getParent()

getVariableDeclarations

public Map getVariableDeclarations()

setParent

public void setParent(Scope parent)