Clover coverage report - PMD - 3.9 Coverage timestamp: Tue Dec 19 2006 09:38:44 EST FRAMES NO FRAMES |
file stats: | LOC: | 63 |  | Methods: | 12
| NCLOC: | 40 |  | Classes: | 1
Source file | Conditionals | Statements | Methods | TOTAL
DummyScope.java | - | 11.1% | 8.3% | 9.5% |

1 |  | package net.sourceforge.pmd.symboltable;
2 |  |
3 |  | import java.util.HashMap;
4 |  | import java.util.Map;
5 |  |
6 |  | /**
7 |  | * Implementation of Scope for source types that are simpler than java sources.
8 |  | * It implements the methods only when necessary not to break at runtime
9 |  | * when Violations are handled.
10 |  | *
11 |  | * @author pieter_van_raemdonck - Application Engineers NV/SA - www.ae.be
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 |  | }