aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/HandleGetter.java
diff options
context:
space:
mode:
authorgrootjans <grootjans@gmail.com>2010-12-18 16:03:22 +0100
committergrootjans <grootjans@gmail.com>2010-12-18 18:02:20 +0100
commit953b6c114051ad7926fea57bde5958345cb87f76 (patch)
treef2b3f611822e93c0b45fac8816a5b9644fea9c49 /src/core/lombok/javac/handlers/HandleGetter.java
parentbac11b43dd73d0e92cac4a14c32e301adb009b10 (diff)
downloadlombok-953b6c114051ad7926fea57bde5958345cb87f76.tar.gz
lombok-953b6c114051ad7926fea57bde5958345cb87f76.tar.bz2
lombok-953b6c114051ad7926fea57bde5958345cb87f76.zip
Moved all the Compile time constants from the Javac handlers and supporting classes
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleGetter.java')
-rw-r--r--src/core/lombok/javac/handlers/HandleGetter.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/lombok/javac/handlers/HandleGetter.java b/src/core/lombok/javac/handlers/HandleGetter.java
index 85387684..cfe5c98a 100644
--- a/src/core/lombok/javac/handlers/HandleGetter.java
+++ b/src/core/lombok/javac/handlers/HandleGetter.java
@@ -262,14 +262,14 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> {
private static final java.util.Map<Integer, String> TYPE_MAP;
static {
Map<Integer, String> m = new HashMap<Integer, String>();
- m.put(TypeTags.INT, "java.lang.Integer");
- m.put(TypeTags.DOUBLE, "java.lang.Double");
- m.put(TypeTags.FLOAT, "java.lang.Float");
- m.put(TypeTags.SHORT, "java.lang.Short");
- m.put(TypeTags.BYTE, "java.lang.Byte");
- m.put(TypeTags.LONG, "java.lang.Long");
- m.put(TypeTags.BOOLEAN, "java.lang.Boolean");
- m.put(TypeTags.CHAR, "java.lang.Character");
+ m.put(Javac.getCTCint(TypeTags.class, "INT"), "java.lang.Integer");
+ m.put(Javac.getCTCint(TypeTags.class, "DOUBLE"), "java.lang.Double");
+ m.put(Javac.getCTCint(TypeTags.class, "FLOAT"), "java.lang.Float");
+ m.put(Javac.getCTCint(TypeTags.class, "SHORT"), "java.lang.Short");
+ m.put(Javac.getCTCint(TypeTags.class, "BYTE"), "java.lang.Byte");
+ m.put(Javac.getCTCint(TypeTags.class, "LONG"), "java.lang.Long");
+ m.put(Javac.getCTCint(TypeTags.class, "BOOLEAN"), "java.lang.Boolean");
+ m.put(Javac.getCTCint(TypeTags.class, "CHAR"), "java.lang.Character");
TYPE_MAP = Collections.unmodifiableMap(m);
}
@@ -329,7 +329,7 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> {
innerIfStatements.append(statement);
}
- JCBinary isNull = maker.Binary(JCTree.EQ, maker.Ident(valueName), maker.Literal(TypeTags.BOT, null));
+ JCBinary isNull = maker.Binary(JCTree.EQ, maker.Ident(valueName), maker.Literal(Javac.getCTCint(TypeTags.class, "BOT"), null));
JCIf ifStatement = maker.If(isNull, maker.Block(0, innerIfStatements.toList()), null);
synchronizedStatements.append(ifStatement);
}
@@ -337,7 +337,7 @@ public class HandleGetter implements JavacAnnotationHandler<Getter> {
synchronizedStatement = maker.Synchronized(createFieldAccessor(maker, fieldNode, FieldAccess.ALWAYS_FIELD), maker.Block(0, synchronizedStatements.toList()));
}
- JCBinary isNull = maker.Binary(JCTree.EQ, maker.Ident(valueName), maker.Literal(TypeTags.BOT, null));
+ JCBinary isNull = maker.Binary(JCTree.EQ, maker.Ident(valueName), maker.Literal(Javac.getCTCint(TypeTags.class, "BOT"), null));
JCIf ifStatement = maker.If(isNull, maker.Block(0, List.<JCStatement>of(synchronizedStatement)), null);
statements.append(ifStatement);
}