コード例 #1
0
 @Override
 public List<JCCompilationUnit> parseFiles(List<JavaFileObject> fileObjects) throws IOException {
   List<JCCompilationUnit> trees = super.parseFiles(fileObjects);
   LinkedList<JCCompilationUnit> moduleTrees = new LinkedList<JCCompilationUnit>();
   loadCompiledModules(trees, moduleTrees);
   for (JCCompilationUnit moduleTree : moduleTrees) {
     trees = trees.append(moduleTree);
   }
   return trees;
 }
コード例 #2
0
 @Override
 public List<JCCompilationUnit> parseFiles(Iterable<JavaFileObject> fileObjects) {
   timer.startTask("parse");
   /*
    * Stef: see javadoc for fixDefaultPackage() for why this is here.
    */
   modelLoader.fixDefaultPackage();
   List<JCCompilationUnit> trees = super.parseFiles(fileObjects);
   timer.startTask("loadCompiledModules");
   LinkedList<JCCompilationUnit> moduleTrees = new LinkedList<JCCompilationUnit>();
   // now load modules and associate their moduleless packages with the corresponding modules
   loadCompiledModules(trees, moduleTrees);
   for (JCCompilationUnit moduleTree : moduleTrees) {
     trees = trees.append(moduleTree);
   }
   /*
    * Stef: see javadoc for cacheModulelessPackages() for why this is here.
    */
   modelLoader.cacheModulelessPackages();
   timer.endTask();
   return trees;
 }