code: public Env<AttrContext> moduleEnv(JCModuleDecl tree, Env<AttrContext> env) {
          Assert.checkNonNull(tree.sym);
          Env<AttrContext> localEnv =
              env.dup(tree, env.info.dup(WriteableScope.create(tree.sym)));
          localEnv.enclClass = predefClassDef;
          localEnv.outer = env;
          localEnv.info.isSelfCall = false;
          localEnv.info.lint = null; // leave this to be filled in by Attr,
                                     // when annotations have been processed
          return localEnv;
      }
docs: Create a fresh environment for modules.
  
  @param tree     The module definition.
  @param env      The environment current outside of the module definition.