diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-11-27 11:45:37 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-11-27 11:45:37 +0100 |
commit | fb71e1bee37af989c7ff8d6df635b7ab3c5b5710 (patch) | |
tree | a30f82f3bcadcef10d3ae5a18cc08a70940a6167 /src/core/lombok | |
parent | 003acffe45f5fb1b13c3ca92cb2f0822857fe437 (diff) | |
download | lombok-fb71e1bee37af989c7ff8d6df635b7ab3c5b5710.tar.gz lombok-fb71e1bee37af989c7ff8d6df635b7ab3c5b5710.tar.bz2 lombok-fb71e1bee37af989c7ff8d6df635b7ab3c5b5710.zip |
This is a patch submitted by lahoda on the issue tracker (issue #61). It apparently makes lombok work on JDK7.
Will need to verify it, but, awesome sleuthing work by lahoda!
Diffstat (limited to 'src/core/lombok')
-rw-r--r-- | src/core/lombok/javac/JavacAST.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/lombok/javac/JavacAST.java b/src/core/lombok/javac/JavacAST.java index 93e3f3dc..e231f1d8 100644 --- a/src/core/lombok/javac/JavacAST.java +++ b/src/core/lombok/javac/JavacAST.java @@ -33,6 +33,7 @@ import javax.tools.JavaFileObject; import lombok.core.AST; import com.sun.tools.javac.code.Symtab; +import com.sun.tools.javac.model.JavacElements; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.tree.JCTree.JCAnnotation; @@ -56,7 +57,7 @@ import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; */ public class JavacAST extends AST<JavacAST, JavacNode, JCTree> { private final Messager messager; - private final Name.Table nameTable; + private final JavacElements elements; private final TreeMaker treeMaker; private final Symtab symtab; private final Log log; @@ -75,7 +76,7 @@ public class JavacAST extends AST<JavacAST, JavacNode, JCTree> { this.context = context; this.messager = messager; this.log = Log.instance(context); - this.nameTable = Name.Table.instance(context); + this.elements = JavacElements.instance(context); this.treeMaker = TreeMaker.instance(context); this.symtab = Symtab.instance(context); clearChanged(); @@ -120,7 +121,7 @@ public class JavacAST extends AST<JavacAST, JavacNode, JCTree> { /** @return A Name object generated for the proper name table belonging to this AST. */ public Name toName(String name) { - return nameTable.fromString(name); + return elements.getName(name); } /** @return A TreeMaker instance that you can use to create new AST nodes. */ |