aboutsummaryrefslogtreecommitdiff
path: root/src/stubs/com/sun/tools/javac/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/stubs/com/sun/tools/javac/main')
-rw-r--r--src/stubs/com/sun/tools/javac/main/Arguments.java13
-rw-r--r--src/stubs/com/sun/tools/javac/main/JavaCompiler.java37
-rw-r--r--src/stubs/com/sun/tools/javac/main/Option.java1
3 files changed, 51 insertions, 0 deletions
diff --git a/src/stubs/com/sun/tools/javac/main/Arguments.java b/src/stubs/com/sun/tools/javac/main/Arguments.java
new file mode 100644
index 00000000..ea866b6e
--- /dev/null
+++ b/src/stubs/com/sun/tools/javac/main/Arguments.java
@@ -0,0 +1,13 @@
+package com.sun.tools.javac.main;
+
+import java.util.Map;
+
+import com.sun.tools.javac.util.Context;
+
+public class Arguments {
+ public static final Context.Key<Arguments> argsKey = new Context.Key<Arguments>();
+ public static Arguments instance(Context context) { return null; }
+ public void init(String ownName, String... argv) {}
+ public Map<Option, String> getDeferredFileManagerOptions() { return null; }
+ public boolean validate() { return false; }
+}
diff --git a/src/stubs/com/sun/tools/javac/main/JavaCompiler.java b/src/stubs/com/sun/tools/javac/main/JavaCompiler.java
new file mode 100644
index 00000000..d0e7b38f
--- /dev/null
+++ b/src/stubs/com/sun/tools/javac/main/JavaCompiler.java
@@ -0,0 +1,37 @@
+/*
+ * These are stub versions of various bits of javac-internal API (for various different versions of javac). Lombok is compiled against these.
+ */
+package com.sun.tools.javac.main;
+
+import java.io.IOException;
+import java.util.Collection;
+import javax.annotation.processing.Processor;
+import javax.tools.JavaFileObject;
+
+import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.List;
+import com.sun.tools.javac.comp.Todo;
+
+public class JavaCompiler {
+ // Shared by JDK6-9
+ public boolean keepComments;
+ public boolean genEndPos;
+ public Todo todo;
+
+ public JavaCompiler(Context context) {}
+ public int errorCount() { return 0; }
+ public static String version() { return "<stub>"; }
+ public JCCompilationUnit parse(String fileName) throws IOException { return null; }
+ public List<JCCompilationUnit> enterTrees(List<JCCompilationUnit> roots) {return null;}
+
+ //JDK up to 8
+ public void initProcessAnnotations(Iterable<? extends Processor> processors) throws IOException {}
+ public JavaCompiler processAnnotations(List<JCCompilationUnit> roots, List<String> classnames) {return this;}
+
+ // JDK 9
+ public void initProcessAnnotations(Iterable<? extends Processor> processors, Collection<? extends JavaFileObject> initialFiles, Collection<String> initialClassNames) {}
+ public void processAnnotations(List<JCCompilationUnit> roots, Collection<String> classnames) {}
+ public void close() {}
+ public List<JCCompilationUnit> initModules(List<JCCompilationUnit> roots) { return null; }
+}
diff --git a/src/stubs/com/sun/tools/javac/main/Option.java b/src/stubs/com/sun/tools/javac/main/Option.java
index f3229c78..ae955772 100644
--- a/src/stubs/com/sun/tools/javac/main/Option.java
+++ b/src/stubs/com/sun/tools/javac/main/Option.java
@@ -7,4 +7,5 @@ package com.sun.tools.javac.main;
public enum Option {
;
public String text;
+ public String primaryName;
}