private NBScope(JavacScope scope) { super(scope.getEnv()); }
/**Checks whether the given scope is in "static" context. */ public boolean isStaticContext(Scope scope) { return Resolve.instance(info.impl.getJavacTask().getContext()).isStatic(((JavacScope)scope).getEnv()); }
/**Attribute the given tree in the given context. */ public TypeMirror attributeTree(Tree tree, Scope scope) { if (scope instanceof NBScope && ((NBScope)scope).areAccessibilityChecksDisabled()) { NBResolve.instance(info.impl.getJavacTask().getContext()).disableAccessibilityChecks(); } try { return info.impl.getJavacTask().attributeTree((JCTree) tree, ((JavacScope) scope).getEnv()); } finally { NBResolve.instance(info.impl.getJavacTask().getContext()).restoreAccessbilityChecks(); } }
public TypeMirror reattributeTree(Tree tree, Scope scope) { Env<AttrContext> env = ((JavacScope)scope).getEnv(); copyInnerClassIndexes(env.tree, tree); if (scope instanceof NBScope && ((NBScope)scope).areAccessibilityChecksDisabled()) { NBResolve.instance(info.impl.getJavacTask().getContext()).disableAccessibilityChecks(); } try { return info.impl.getJavacTask().attributeTree((JCTree)tree, env); } finally { NBResolve.instance(info.impl.getJavacTask().getContext()).restoreAccessbilityChecks(); } }
/**Attribute the given tree until the given <code>to</code> tree is reached. * Returns scope valid at point when <code>to</code> is reached. */ public Scope attributeTreeTo(Tree tree, Scope scope, Tree to) { if (scope instanceof NBScope && ((NBScope)scope).areAccessibilityChecksDisabled()) { NBResolve.instance(info.impl.getJavacTask().getContext()).disableAccessibilityChecks(); } try { return info.impl.getJavacTask().attributeTreeTo((JCTree)tree, ((JavacScope)scope).getEnv(), (JCTree)to); } finally { NBResolve.instance(info.impl.getJavacTask().getContext()).restoreAccessbilityChecks(); } }
public Scope reattributeTreeTo(Tree tree, Scope scope, Tree to) { Env<AttrContext> env = ((JavacScope)scope).getEnv(); copyInnerClassIndexes(env.tree, tree); if (scope instanceof NBScope && ((NBScope)scope).areAccessibilityChecksDisabled()) { NBResolve.instance(info.impl.getJavacTask().getContext()).disableAccessibilityChecks(); } try { return info.impl.getJavacTask().attributeTreeTo((JCTree)tree, env, (JCTree)to); } finally { NBResolve.instance(info.impl.getJavacTask().getContext()).restoreAccessbilityChecks(); } }
case EXTENDS: case IMPLEMENTS: ((JavacScope)scope).getEnv().baseClause = true; default: return scope;