aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2013-09-09 20:40:04 +0200
committerRoel Spilker <r.spilker@gmail.com>2013-09-09 20:40:04 +0200
commitf2662518de40569e073991bc70a1629881ba655e (patch)
tree8e09065ef699744bd379909146531f3bab15e456 /src
parent0932ccb51b83ac6b98450f3b96f4b1b764a81651 (diff)
downloadlombok-f2662518de40569e073991bc70a1629881ba655e.tar.gz
lombok-f2662518de40569e073991bc70a1629881ba655e.tar.bz2
lombok-f2662518de40569e073991bc70a1629881ba655e.zip
[jdk8support] jdk8 support branch now compiles under javac7, and produces lombok.jar that works on all javas.
Diffstat (limited to 'src')
-rw-r--r--src/delombok/lombok/delombok/Delombok.java2
-rw-r--r--src/delombok/lombok/delombok/DelombokApp.java2
-rw-r--r--src/stubs/com/sun/tools/javac/parser/JavaTokenizer.java19
-rw-r--r--src/stubs/com/sun/tools/javac/parser/JavacParser.java12
-rw-r--r--src/stubs/com/sun/tools/javac/parser/Tokens.java11
-rw-r--r--src/stubs/com/sun/tools/javac/parser/UnicodeReader.java18
6 files changed, 61 insertions, 3 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index 473afb5c..1fae4560 100644
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -30,7 +30,6 @@ import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.Writer;
-import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URI;
@@ -50,7 +49,6 @@ import javax.tools.JavaFileObject;
import lombok.Lombok;
import lombok.javac.CommentCatcher;
import lombok.javac.LombokOptions;
-import lombok.javac.apt.Processor;
import com.sun.tools.javac.comp.Todo;
import com.sun.tools.javac.main.JavaCompiler;
diff --git a/src/delombok/lombok/delombok/DelombokApp.java b/src/delombok/lombok/delombok/DelombokApp.java
index 90a7b55e..52c6b1d4 100644
--- a/src/delombok/lombok/delombok/DelombokApp.java
+++ b/src/delombok/lombok/delombok/DelombokApp.java
@@ -84,7 +84,7 @@ public class DelombokApp extends LombokApp {
return null;
}
- final JarFile toolsJarFile = new JarFile(toolsJar);
+ @SuppressWarnings("resource") final JarFile toolsJarFile = new JarFile(toolsJar);
ClassLoader loader = new ClassLoader() {
private Class<?> loadStreamAsClass(String name, boolean resolve, InputStream in) throws ClassNotFoundException {
diff --git a/src/stubs/com/sun/tools/javac/parser/JavaTokenizer.java b/src/stubs/com/sun/tools/javac/parser/JavaTokenizer.java
new file mode 100644
index 00000000..7d5bbcb1
--- /dev/null
+++ b/src/stubs/com/sun/tools/javac/parser/JavaTokenizer.java
@@ -0,0 +1,19 @@
+package com.sun.tools.javac.parser;
+
+import com.sun.tools.javac.parser.Tokens.Comment;
+import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle;
+
+public class JavaTokenizer {
+ protected UnicodeReader reader;
+
+ protected JavaTokenizer(ScannerFactory fac, UnicodeReader reader) {
+ }
+
+ public com.sun.tools.javac.parser.Tokens.Token readToken() {
+ return null;
+ }
+
+ protected Comment processComment(int pos, int endPos, CommentStyle style) {
+ return null;
+ }
+}
diff --git a/src/stubs/com/sun/tools/javac/parser/JavacParser.java b/src/stubs/com/sun/tools/javac/parser/JavacParser.java
new file mode 100644
index 00000000..da42f37a
--- /dev/null
+++ b/src/stubs/com/sun/tools/javac/parser/JavacParser.java
@@ -0,0 +1,12 @@
+package com.sun.tools.javac.parser;
+
+import com.sun.tools.javac.tree.JCTree;
+
+public class JavacParser {
+ protected JavacParser(ParserFactory fac, Lexer S, boolean keepDocComments, boolean keepLineMap, boolean keepEndPositions) {
+ }
+
+ public JCTree.JCCompilationUnit parseCompilationUnit() {
+ return null;
+ }
+}
diff --git a/src/stubs/com/sun/tools/javac/parser/Tokens.java b/src/stubs/com/sun/tools/javac/parser/Tokens.java
new file mode 100644
index 00000000..3d14d27c
--- /dev/null
+++ b/src/stubs/com/sun/tools/javac/parser/Tokens.java
@@ -0,0 +1,11 @@
+package com.sun.tools.javac.parser;
+
+public class Tokens {
+ public static class Token {
+
+ }
+
+ public interface Comment {
+ enum CommentStyle {}
+ }
+}
diff --git a/src/stubs/com/sun/tools/javac/parser/UnicodeReader.java b/src/stubs/com/sun/tools/javac/parser/UnicodeReader.java
new file mode 100644
index 00000000..1c09eb6b
--- /dev/null
+++ b/src/stubs/com/sun/tools/javac/parser/UnicodeReader.java
@@ -0,0 +1,18 @@
+package com.sun.tools.javac.parser;
+
+import java.nio.CharBuffer;
+
+public class UnicodeReader {
+ protected int bp;
+
+ protected UnicodeReader(ScannerFactory sf, char[] input, int inputLength) {
+ }
+
+ protected UnicodeReader(ScannerFactory sf, CharBuffer buffer) {
+
+ }
+
+ public char[] getRawCharacters(int beginIndex, int endIndex) {
+ return null;
+ }
+}