1 |
| package net.sourceforge.pmd.symboltable; |
2 |
| |
3 |
| import java.util.HashMap; |
4 |
| import java.util.Map; |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| public class DummyScope implements Scope { |
14 |
| private Map emptyMap = new HashMap(); |
15 |
| |
16 |
| private Scope parent; |
17 |
| |
18 |
0
| public Map getVariableDeclarations() {
|
19 |
0
| return emptyMap;
|
20 |
| } |
21 |
| |
22 |
0
| public Map getClassDeclarations() {
|
23 |
0
| return emptyMap;
|
24 |
| } |
25 |
| |
26 |
0
| public void addDeclaration(ClassNameDeclaration decl) {
|
27 |
| } |
28 |
| |
29 |
0
| public void addDeclaration(VariableNameDeclaration decl) {
|
30 |
| } |
31 |
| |
32 |
0
| public void addDeclaration(MethodNameDeclaration decl) {
|
33 |
| } |
34 |
| |
35 |
0
| public boolean contains(NameOccurrence occ) {
|
36 |
0
| return false;
|
37 |
| } |
38 |
| |
39 |
0
| public NameDeclaration addVariableNameOccurrence(NameOccurrence occ) {
|
40 |
0
| return null;
|
41 |
| } |
42 |
| |
43 |
0
| public void setParent(Scope parent) {
|
44 |
0
| this.parent = parent;
|
45 |
| } |
46 |
| |
47 |
0
| public Scope getParent() {
|
48 |
0
| return parent;
|
49 |
| } |
50 |
| |
51 |
0
| public ClassScope getEnclosingClassScope() {
|
52 |
0
| return new ClassScope();
|
53 |
| } |
54 |
| |
55 |
36
| public SourceFileScope getEnclosingSourceFileScope() {
|
56 |
36
| return new SourceFileScope();
|
57 |
| } |
58 |
| |
59 |
0
| public MethodScope getEnclosingMethodScope() {
|
60 |
0
| return null;
|
61 |
| } |
62 |
| |
63 |
| } |