aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/delombok/lombok/delombok/Delombok.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index 3f521274..f67e3724 100644
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -68,15 +68,11 @@ public class Delombok {
this.presetWriter = writer;
}
- public Delombok() {
-// context.put(DeleteLombokAnnotations.class, new DeleteLombokAnnotations(true));
- }
-
private PrintStream feedback = System.err;
private boolean verbose;
private boolean noCopy;
private boolean force = false;
- private String classpath, sourcepath;
+ private String classpath, sourcepath, bootclasspath;
private LinkedHashMap<File, File> fileToBase = new LinkedHashMap<File, File>();
private List<File> filesToParse = new ArrayList<File>();
@@ -115,6 +111,9 @@ public class Delombok {
@Description("Sourcepath (analogous to javac -sourcepath option)")
private String sourcepath;
+ @Description("override Bootclasspath (analogous to javac -bootclasspath option)")
+ private String bootclasspath;
+
@Description("Files to delombok. Provide either a file, or a directory. If you use a directory, all files in it (recursive) are delombok-ed")
@Sequential
private List<String> input = new ArrayList<String>();
@@ -173,6 +172,7 @@ public class Delombok {
if (args.classpath != null) delombok.setClasspath(args.classpath);
if (args.sourcepath != null) delombok.setSourcepath(args.sourcepath);
+ if (args.bootclasspath != null) delombok.setBootclasspath(args.bootclasspath);
try {
for (String in : args.input) {
@@ -230,6 +230,10 @@ public class Delombok {
this.sourcepath = sourcepath;
}
+ public void setBootclasspath(String bootclasspath) {
+ this.bootclasspath = bootclasspath;
+ }
+
public void setVerbose(boolean verbose) {
this.verbose = verbose;
}
@@ -355,6 +359,7 @@ public class Delombok {
options.put(OptionName.ENCODING, charset.name());
if (classpath != null) options.put(OptionName.CLASSPATH, classpath);
if (sourcepath != null) options.put(OptionName.SOURCEPATH, sourcepath);
+ if (bootclasspath != null) options.put(OptionName.BOOTCLASSPATH, bootclasspath);
options.put("compilePolicy", "attr");
CommentCatcher catcher = CommentCatcher.create(context);
@@ -363,7 +368,6 @@ public class Delombok {
List<JCCompilationUnit> roots = new ArrayList<JCCompilationUnit>();
Map<JCCompilationUnit, File> baseMap = new IdentityHashMap<JCCompilationUnit, File>();
-
compiler.initProcessAnnotations(Collections.singleton(new lombok.javac.apt.Processor()));
for (File fileToParse : filesToParse) {