equal
deleted
inserted
replaced
43 import java.util.List; |
43 import java.util.List; |
44 import java.util.Map; |
44 import java.util.Map; |
45 import java.util.Set; |
45 import java.util.Set; |
46 import java.util.stream.Collectors; |
46 import java.util.stream.Collectors; |
47 |
47 |
|
48 import com.sun.tools.sjavac.comp.CompilationService; |
48 import com.sun.tools.sjavac.options.Options; |
49 import com.sun.tools.sjavac.options.Options; |
49 import com.sun.tools.sjavac.pubapi.PubApi; |
50 import com.sun.tools.sjavac.pubapi.PubApi; |
50 import com.sun.tools.sjavac.server.Sjavac; |
|
51 |
51 |
52 /** |
52 /** |
53 * The javac state class maintains the previous (prev) and the current (now) |
53 * The javac state class maintains the previous (prev) and the current (now) |
54 * build states and everything else that goes into the javac_state file. |
54 * build states and everything else that goes into the javac_state file. |
55 * |
55 * |
746 } |
746 } |
747 |
747 |
748 /** |
748 /** |
749 * Compile all the java sources. Return true, if it needs to be called again! |
749 * Compile all the java sources. Return true, if it needs to be called again! |
750 */ |
750 */ |
751 public boolean performJavaCompilations(Sjavac sjavac, |
751 public boolean performJavaCompilations(CompilationService sjavac, |
752 Options args, |
752 Options args, |
753 Set<String> recentlyCompiled, |
753 Set<String> recentlyCompiled, |
754 boolean[] rcValue) { |
754 boolean[] rcValue) { |
755 Map<String,Transformer> suffixRules = new HashMap<>(); |
755 Map<String,Transformer> suffixRules = new HashMap<>(); |
756 suffixRules.put(".java", compileJavaPackages); |
756 suffixRules.put(".java", compileJavaPackages); |
788 |
788 |
789 /** |
789 /** |
790 * For all packages, find all sources belonging to the package, group the sources |
790 * For all packages, find all sources belonging to the package, group the sources |
791 * based on their transformers and apply the transformers on each source code group. |
791 * based on their transformers and apply the transformers on each source code group. |
792 */ |
792 */ |
793 private boolean perform(Sjavac sjavac, |
793 private boolean perform(CompilationService sjavac, |
794 File outputDir, |
794 File outputDir, |
795 Map<String,Transformer> suffixRules) { |
795 Map<String,Transformer> suffixRules) { |
796 boolean rc = true; |
796 boolean rc = true; |
797 // Group sources based on transforms. A source file can only belong to a single transform. |
797 // Group sources based on transforms. A source file can only belong to a single transform. |
798 Map<Transformer,Map<String,Set<URI>>> groupedSources = new HashMap<>(); |
798 Map<Transformer,Map<String,Set<URI>>> groupedSources = new HashMap<>(); |