Exemplo n.º 1
0
 public Env<AttrContext> getTopLevelEnv(JCCompilationUnit tree) {
   Env<AttrContext> localEnv = new Env<AttrContext>(tree, new AttrContext());
   localEnv.toplevel = tree;
   localEnv.enclClass = predefClassDef;
   localEnv.info.scope = tree.namedImportScope;
   localEnv.info.lint = lint;
   return localEnv;
 }
Exemplo n.º 2
0
 /**
  * Create a fresh environment for toplevels.
  *
  * @param tree The toplevel tree.
  */
 Env<AttrContext> topLevelEnv(JCCompilationUnit tree) {
   Env<AttrContext> localEnv = new Env<AttrContext>(tree, new AttrContext());
   localEnv.toplevel = tree;
   localEnv.enclClass = predefClassDef;
   tree.namedImportScope = new ImportScope(tree.packge);
   tree.starImportScope = new StarImportScope(tree.packge);
   localEnv.info.scope = tree.namedImportScope;
   localEnv.info.lint = lint;
   return localEnv;
 }