1 package net.sourceforge.pmd.symboltable;
2
3 import java.util.Collections;
4 import java.util.Map;
5
6 public class GlobalScope extends AbstractScope implements Scope {
7
8 public ClassScope getEnclosingClassScope() {
9 throw new RuntimeException("getEnclosingClassScope() called on GlobalScope");
10 }
11
12 public void addDeclaration(MethodNameDeclaration decl) {
13 throw new RuntimeException("addMethodDeclaration() called on GlobalScope");
14 }
15
16 public Map getUnusedVariableDeclarations() {
17 return Collections.EMPTY_MAP;
18 }
19
20 public void addDeclaration(VariableNameDeclaration decl) {
21 }
22
23 public boolean contains(NameOccurrence occ) {
24 return false;
25 }
26
27 public NameDeclaration addVariableNameOccurrence(NameOccurrence occ) {
28 return null;
29 }
30
31 public String toString() {
32 return "GlobalScope:" + super.glomNames();
33 }
34
35 protected NameDeclaration findVariableHere(NameOccurrence occ) {
36 return null;
37 }
38
39 }
This page was automatically generated by Maven