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