本文整理汇总了Java中com.sun.tools.javac.code.Scope.CompoundScope类的典型用法代码示例。如果您正苦于以下问题:Java CompoundScope类的具体用法?Java CompoundScope怎么用?Java CompoundScope使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CompoundScope类属于com.sun.tools.javac.code.Scope包,在下文中一共展示了CompoundScope类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printFullScopeImpl
import com.sun.tools.javac.code.Scope.CompoundScope; //导入依赖的package包/类
void printFullScopeImpl(Scope scope) {
indent();
out.println(scope.getClass().getName());
printSymbol("owner", scope.owner, Details.SUMMARY);
if (SCOPE_IMPL_CLASS.equals(scope.getClass().getName())) {
printScope("next", (Scope) getField(scope, scope.getClass(), "next"), Details.SUMMARY);
printObject("shared", getField(scope, scope.getClass(), "shared"), Details.SUMMARY);
Object[] table = (Object[]) getField(scope, scope.getClass(), "table");
for (int i = 0; i < table.length; i++) {
if (i > 0)
out.print(", ");
else
indent();
out.print(i + ":" + entryToString(table[i], table, false));
}
out.println();
} else if (FILTER_SCOPE_CLASS.equals(scope.getClass().getName())) {
printScope("origin",
(Scope) getField(scope, scope.getClass(), "origin"), Details.FULL);
} else if (scope instanceof CompoundScope) {
printList("delegates", (List<?>) getField(scope, CompoundScope.class, "subScopes"));
} else {
for (Symbol sym : scope.getSymbols()) {
printSymbol(sym.name.toString(), sym, Details.SUMMARY);
}
}
}