globalscope.java

来自「检查Java程序漏洞」· Java 代码 · 共 43 行

JAVA
43
字号
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html*/package net.sourceforge.pmd.symboltable;import java.util.Collections;import java.util.Map;public class GlobalScope extends AbstractScope implements Scope {    public ClassScope getEnclosingClassScope() {        throw new RuntimeException("getEnclosingClassScope() called on GlobalScope");    }    public void addDeclaration(MethodNameDeclaration decl) {        throw new RuntimeException("addMethodDeclaration() called on GlobalScope");    }    public Map getUnusedVariableDeclarations() {        return Collections.EMPTY_MAP;    }    public void addDeclaration(VariableNameDeclaration decl) {    }    public boolean contains(NameOccurrence occ) {        return false;    }    public NameDeclaration addVariableNameOccurrence(NameOccurrence occ) {        return null;    }    public String toString() {        return "GlobalScope:" + super.glomNames();    }    protected NameDeclaration findVariableHere(NameOccurrence occ) {        return null;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?