diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-11-12 22:07:07 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-11-12 22:07:07 +0100 |
commit | 7e84f8d1c2abd902dfc7a88c2f60c58717a955a1 (patch) | |
tree | ca384cb2aac5d08982ea57612e145f4642882f5d /src/utils | |
parent | 8a6167f8b03b0b60e9fece01ff73c45a49b8ff9d (diff) | |
download | lombok-7e84f8d1c2abd902dfc7a88c2f60c58717a955a1.tar.gz lombok-7e84f8d1c2abd902dfc7a88c2f60c58717a955a1.tar.bz2 lombok-7e84f8d1c2abd902dfc7a88c2f60c58717a955a1.zip |
[refactor] Cleaned up static imports (always use *), and refactored out getCtcInt calls into constants as defined in Javac.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/lombok/javac/Javac.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/utils/lombok/javac/Javac.java b/src/utils/lombok/javac/Javac.java index f4d2b49d..75bb2dbf 100644 --- a/src/utils/lombok/javac/Javac.java +++ b/src/utils/lombok/javac/Javac.java @@ -23,6 +23,8 @@ package lombok.javac; import java.util.regex.Pattern; +import com.sun.tools.javac.code.TypeTags; +import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.JCExpression; import com.sun.tools.javac.tree.JCTree.JCFieldAccess; import com.sun.tools.javac.tree.JCTree.JCIdent; @@ -71,6 +73,26 @@ public class Javac { } else return null; } + public static final int CTC_BOOLEAN = getCtcInt(TypeTags.class, "BOOLEAN"); + public static final int CTC_INT = getCtcInt(TypeTags.class, "INT"); + public static final int CTC_DOUBLE = getCtcInt(TypeTags.class, "DOUBLE"); + public static final int CTC_FLOAT = getCtcInt(TypeTags.class, "FLOAT"); + public static final int CTC_SHORT = getCtcInt(TypeTags.class, "SHORT"); + public static final int CTC_BYTE = getCtcInt(TypeTags.class, "BYTE"); + public static final int CTC_LONG = getCtcInt(TypeTags.class, "LONG"); + public static final int CTC_CHAR = getCtcInt(TypeTags.class, "CHAR"); + public static final int CTC_VOID = getCtcInt(TypeTags.class, "VOID"); + public static final int CTC_NONE = getCtcInt(TypeTags.class, "NONE"); + + public static final int CTC_NOT_EQUAL = getCtcInt(JCTree.class, "NE"); + public static final int CTC_NOT = getCtcInt(JCTree.class, "NOT"); + public static final int CTC_BITXOR = getCtcInt(JCTree.class, "BITXOR"); + public static final int CTC_UNSIGNED_SHIFT_RIGHT = getCtcInt(JCTree.class, "USR"); + public static final int CTC_MUL = getCtcInt(JCTree.class, "MUL"); + public static final int CTC_PLUS = getCtcInt(JCTree.class, "PLUS"); + public static final int CTC_BOT = getCtcInt(TypeTags.class, "BOT"); + public static final int CTC_EQUAL = getCtcInt(JCTree.class, "EQ"); + /** * Retrieves a compile time constant of type int from the specified class location. * |