From 7dede9a6647ded762701d70d6e71066557196fb5 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 22 Nov 2010 23:00:02 +0100 Subject: Added storing instanceof JavacTypes in JavacAST, and renamed JavacResolution's methods. --- src/core/lombok/javac/JavacAST.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/lombok/javac/JavacAST.java') diff --git a/src/core/lombok/javac/JavacAST.java b/src/core/lombok/javac/JavacAST.java index fb837255..35916fa5 100644 --- a/src/core/lombok/javac/JavacAST.java +++ b/src/core/lombok/javac/JavacAST.java @@ -34,6 +34,7 @@ import lombok.core.AST; import com.sun.tools.javac.code.Symtab; import com.sun.tools.javac.model.JavacElements; +import com.sun.tools.javac.model.JavacTypes; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.tree.JCTree.JCAnnotation; @@ -61,6 +62,7 @@ public class JavacAST extends AST { private final JavacElements elements; private final TreeMaker treeMaker; private final Symtab symtab; + private final JavacTypes javacTypes; private final Log log; private final Context context; @@ -80,6 +82,7 @@ public class JavacAST extends AST { this.elements = JavacElements.instance(context); this.treeMaker = TreeMaker.instance(context); this.symtab = Symtab.instance(context); + this.javacTypes = JavacTypes.instance(context); clearChanged(); } @@ -135,6 +138,13 @@ public class JavacAST extends AST { return symtab; } + /** + * @return The implementation of {@link javax.lang.model.util.Types} of javac. Contains a few extra methods beyond + * the ones listed in the official annotation API interface. */ + public JavacTypes getTypesUtil() { + return javacTypes; + } + /** {@inheritDoc} */ @Override protected JavacNode buildTree(JCTree node, Kind kind) { switch (kind) { -- cgit