mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8048318: Refactor sjavac as a thin client
Moved compilation logic from client to server. Reviewed-by: jlahoda
This commit is contained in:
parent
062a960fd6
commit
3672dbcddf
22 changed files with 637 additions and 677 deletions
|
@ -51,10 +51,10 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import com.sun.tools.sjavac.CopyFile;
|
||||
import com.sun.tools.sjavac.Main;
|
||||
import com.sun.tools.sjavac.Module;
|
||||
import com.sun.tools.sjavac.Source;
|
||||
import com.sun.tools.sjavac.client.ClientMain;
|
||||
import com.sun.tools.sjavac.comp.SjavacImpl;
|
||||
import com.sun.tools.sjavac.options.Options;
|
||||
import com.sun.tools.sjavac.options.SourceLocation;
|
||||
|
||||
|
@ -136,7 +136,7 @@ public class OptionDecoding {
|
|||
Options options = Options.parseArgs("-if", "root/pkg1/ClassA1.java", "root");
|
||||
|
||||
Map<String, Source> foundFiles = new HashMap<>();
|
||||
ClientMain.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
SjavacImpl.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
new HashMap<String, Module>(), new Module("", ""), false, true);
|
||||
|
||||
checkFilesFound(foundFiles.keySet(), a1);
|
||||
|
@ -148,7 +148,7 @@ public class OptionDecoding {
|
|||
Options options = Options.parseArgs("-i", "pkg1/*", "root");
|
||||
|
||||
Map<String, Source> foundFiles = new HashMap<>();
|
||||
ClientMain.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
SjavacImpl.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
new HashMap<String, Module>(), new Module("", ""), false, true);
|
||||
|
||||
checkFilesFound(foundFiles.keySet(), a1, a2, b1, b2);
|
||||
|
@ -160,7 +160,7 @@ public class OptionDecoding {
|
|||
Options options = Options.parseArgs("-xf", "root/pkg1/ClassA1.java", "root");
|
||||
|
||||
Map<String, Source> foundFiles = new HashMap<>();
|
||||
ClientMain.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
SjavacImpl.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
new HashMap<String, Module>(), new Module("", ""), false, true);
|
||||
|
||||
checkFilesFound(foundFiles.keySet(), a2, b1, b2, c1, c2);
|
||||
|
@ -171,7 +171,7 @@ public class OptionDecoding {
|
|||
Options options = Options.parseArgs("-i", "pkg1/*", "root");
|
||||
|
||||
Map<String, Source> foundFiles = new HashMap<>();
|
||||
ClientMain.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
SjavacImpl.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
new HashMap<String, Module>(), new Module("", ""), false, true);
|
||||
|
||||
checkFilesFound(foundFiles.keySet(), a1, a2, b1, b2);
|
||||
|
@ -182,7 +182,7 @@ public class OptionDecoding {
|
|||
Options options = Options.parseArgs("-i", "pkg1/*", "-x", "pkg1/pkg2/*", "root");
|
||||
|
||||
Map<String, Source> foundFiles = new HashMap<>();
|
||||
ClientMain.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
SjavacImpl.findSourceFiles(options.getSources(), Collections.singleton(".java"), foundFiles,
|
||||
new HashMap<String, Module>(), new Module("", ""), false, true);
|
||||
|
||||
checkFilesFound(foundFiles.keySet(), a1, a2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue