aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/Javac.java2
-rw-r--r--src/core/lombok/javac/JavacResolution.java24
-rw-r--r--src/core/lombok/javac/handlers/HandleCleanup.java2
-rw-r--r--src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java44
-rw-r--r--src/core/lombok/javac/handlers/HandleGetter.java20
-rw-r--r--src/core/lombok/javac/handlers/HandleSetter.java6
-rw-r--r--src/core/lombok/javac/handlers/HandleSynchronized.java2
-rw-r--r--src/core/lombok/javac/handlers/HandleToString.java12
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java2
9 files changed, 57 insertions, 57 deletions
diff --git a/src/core/lombok/javac/Javac.java b/src/core/lombok/javac/Javac.java
index 64e8ee27..594539cd 100644
--- a/src/core/lombok/javac/Javac.java
+++ b/src/core/lombok/javac/Javac.java
@@ -187,7 +187,7 @@ public class Javac {
* @param ctcLocation location of the compile time constant
* @param identifier the name of the field of the compile time constant.
*/
- public static int getCTCint(Class<?> ctcLocation, String identifier) {
+ public static int getCtcInt(Class<?> ctcLocation, String identifier) {
try {
return (Integer)ctcLocation.getField(identifier).get(null);
} catch (NoSuchFieldException e) {
diff --git a/src/core/lombok/javac/JavacResolution.java b/src/core/lombok/javac/JavacResolution.java
index 5f0e3621..7361de90 100644
--- a/src/core/lombok/javac/JavacResolution.java
+++ b/src/core/lombok/javac/JavacResolution.java
@@ -349,8 +349,8 @@ public class JavacResolution {
// NB: There's such a thing as maker.Type(type), but this doesn't work very well; it screws up anonymous classes, captures, and adds an extra prefix dot for some reason too.
// -- so we write our own take on that here.
- if (type.tag == Javac.getCTCint(TypeTags.class, "BOT")) return createJavaLangObject(maker, ast);
- if (type.tag == Javac.getCTCint(TypeTags.class, "VOID")) return allowVoid ? primitiveToJCTree(type.getKind(), maker) : createJavaLangObject(maker, ast);
+ if (type.tag == Javac.getCtcInt(TypeTags.class, "BOT")) return createJavaLangObject(maker, ast);
+ if (type.tag == Javac.getCtcInt(TypeTags.class, "VOID")) return allowVoid ? primitiveToJCTree(type.getKind(), maker) : createJavaLangObject(maker, ast);
if (type.isPrimitive()) return primitiveToJCTree(type.getKind(), maker);
if (type.isErroneous()) throw new TypeNotConvertibleException("Type cannot be resolved");
@@ -384,7 +384,7 @@ public class JavacResolution {
upper = type.getUpperBound();
}
if (allowCompound) {
- if (lower == null || lower.tag == Javac.getCTCint(TypeTags.class, "BOT")) {
+ if (lower == null || lower.tag == Javac.getCtcInt(TypeTags.class, "BOT")) {
if (upper == null || upper.toString().equals("java.lang.Object")) {
return maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null);
}
@@ -421,23 +421,23 @@ public class JavacResolution {
private static JCExpression primitiveToJCTree(TypeKind kind, TreeMaker maker) throws TypeNotConvertibleException {
switch (kind) {
case BYTE:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "BYTE"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "BYTE"));
case CHAR:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "CHAR"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "CHAR"));
case SHORT:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "SHORT"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "SHORT"));
case INT:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "INT"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "INT"));
case LONG:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "LONG"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "LONG"));
case FLOAT:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "FLOAT"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "FLOAT"));
case DOUBLE:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "DOUBLE"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "DOUBLE"));
case BOOLEAN:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "BOOLEAN"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "BOOLEAN"));
case VOID:
- return maker.TypeIdent(Javac.getCTCint(TypeTags.class, "VOID"));
+ return maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "VOID"));
case NULL:
case NONE:
case OTHER:
diff --git a/src/core/lombok/javac/handlers/HandleCleanup.java b/src/core/lombok/javac/handlers/HandleCleanup.java
index cc1eb174..43dacda2 100644
--- a/src/core/lombok/javac/handlers/HandleCleanup.java
+++ b/src/core/lombok/javac/handlers/HandleCleanup.java
@@ -118,7 +118,7 @@ public class HandleCleanup extends JavacAnnotationHandler<Cleanup> {
maker.Apply(List.<JCExpression>nil(), cleanupMethod, List.<JCExpression>nil())));
JCMethodInvocation preventNullAnalysis = preventNullAnalysis(maker, annotationNode, maker.Ident(decl.name));
- JCBinary isNull = maker.Binary(Javac.getCTCint(JCTree.class, "NE"), preventNullAnalysis, maker.Literal(Javac.getCTCint(TypeTags.class, "BOT"), null));
+ JCBinary isNull = maker.Binary(Javac.getCtcInt(JCTree.class, "NE"), preventNullAnalysis, maker.Literal(Javac.getCtcInt(TypeTags.class, "BOT"), null));
JCIf ifNotNullCleanup = maker.If(isNull, maker.Block(0, cleanupCall), null);
diff --git a/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java b/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java
index 47255a2c..afd299ef 100644
--- a/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java
+++ b/src/core/lombok/javac/handlers/HandleEqualsAndHashCode.java
@@ -211,7 +211,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
JCAnnotation overrideAnnotation = maker.Annotation(chainDots(maker, typeNode, "java", "lang", "Override"), List.<JCExpression>nil());
JCModifiers mods = maker.Modifiers(Flags.PUBLIC, List.of(overrideAnnotation));
- JCExpression returnType = maker.TypeIdent(Javac.getCTCint(TypeTags.class, "INT"));
+ JCExpression returnType = maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "INT"));
ListBuffer<JCStatement> statements = ListBuffer.lb();
Name primeName = typeNode.toName("PRIME");
@@ -219,12 +219,12 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
/* final int PRIME = 31; */ {
if (!fields.isEmpty() || callSuper) {
statements.append(maker.VarDef(maker.Modifiers(Flags.FINAL),
- primeName, maker.TypeIdent(Javac.getCTCint(TypeTags.class, "INT")), maker.Literal(31)));
+ primeName, maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "INT")), maker.Literal(31)));
}
}
/* int result = 1; */ {
- statements.append(maker.VarDef(maker.Modifiers(0), resultName, maker.TypeIdent(Javac.getCTCint(TypeTags.class, "INT")), maker.Literal(1)));
+ statements.append(maker.VarDef(maker.Modifiers(0), resultName, maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "INT")), maker.Literal(1)));
}
ListBuffer<JCExpression> intoResult = ListBuffer.lb();
@@ -289,7 +289,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
/* this.fieldName == null ? 0 : this.fieldName.hashCode() */
JCExpression hcCall = maker.Apply(List.<JCExpression>nil(), maker.Select(createFieldAccessor(maker, fieldNode, fieldAccess), typeNode.toName("hashCode")),
List.<JCExpression>nil());
- JCExpression thisEqualsNull = maker.Binary(Javac.getCTCint(JCTree.class, "EQ"), fieldAccessor, maker.Literal(Javac.getCTCint(TypeTags.class, "BOT"), null));
+ JCExpression thisEqualsNull = maker.Binary(Javac.getCtcInt(JCTree.class, "EQ"), fieldAccessor, maker.Literal(Javac.getCtcInt(TypeTags.class, "BOT"), null));
intoResult.append(
maker.Conditional(thisEqualsNull, maker.Literal(0), hcCall));
}
@@ -298,8 +298,8 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
/* fold each intoResult entry into:
result = result * PRIME + (item); */
for (JCExpression expr : intoResult) {
- JCExpression mult = maker.Binary(Javac.getCTCint(JCTree.class, "MUL"), maker.Ident(resultName), maker.Ident(primeName));
- JCExpression add = maker.Binary(Javac.getCTCint(JCTree.class, "PLUS"), mult, expr);
+ JCExpression mult = maker.Binary(Javac.getCtcInt(JCTree.class, "MUL"), maker.Ident(resultName), maker.Ident(primeName));
+ JCExpression add = maker.Binary(Javac.getCtcInt(JCTree.class, "PLUS"), mult, expr);
statements.append(maker.Exec(maker.Assign(maker.Ident(resultName), add)));
}
@@ -315,9 +315,9 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
/** The 2 references must be clones of each other. */
private JCExpression longToIntForHashCode(TreeMaker maker, JCExpression ref1, JCExpression ref2) {
/* (int)(ref >>> 32 ^ ref) */
- JCExpression shift = maker.Binary(Javac.getCTCint(JCTree.class, "USR"), ref1, maker.Literal(32));
- JCExpression xorBits = maker.Binary(Javac.getCTCint(JCTree.class, "BITXOR"), shift, ref2);
- return maker.TypeCast(maker.TypeIdent(Javac.getCTCint(TypeTags.class, "INT")), xorBits);
+ JCExpression shift = maker.Binary(Javac.getCtcInt(JCTree.class, "USR"), ref1, maker.Literal(32));
+ JCExpression xorBits = maker.Binary(Javac.getCtcInt(JCTree.class, "BITXOR"), shift, ref2);
+ return maker.TypeCast(maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "INT")), xorBits);
}
private JCMethodDecl createEquals(JavacNode typeNode, List<JavacNode> fields, boolean callSuper, FieldAccess fieldAccess, boolean needsCanEqual, JCTree source) {
@@ -331,18 +331,18 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
JCAnnotation overrideAnnotation = maker.Annotation(chainDots(maker, typeNode, "java", "lang", "Override"), List.<JCExpression>nil());
JCModifiers mods = maker.Modifiers(Flags.PUBLIC, List.of(overrideAnnotation));
JCExpression objectType = chainDots(maker, typeNode, "java", "lang", "Object");
- JCExpression returnType = maker.TypeIdent(Javac.getCTCint(TypeTags.class, "BOOLEAN"));
+ JCExpression returnType = maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "BOOLEAN"));
ListBuffer<JCStatement> statements = ListBuffer.lb();
final List<JCVariableDecl> params = List.of(maker.VarDef(maker.Modifiers(Flags.FINAL), oName, objectType, null));
/* if (o == this) return true; */ {
- statements.append(maker.If(maker.Binary(Javac.getCTCint(JCTree.class, "EQ"), maker.Ident(oName),
+ statements.append(maker.If(maker.Binary(Javac.getCtcInt(JCTree.class, "EQ"), maker.Ident(oName),
maker.Ident(thisName)), returnBool(maker, true), null));
}
/* if (!(o instanceof MyType) return false; */ {
- JCUnary notInstanceOf = maker.Unary(Javac.getCTCint(JCTree.class, "NOT"), maker.TypeTest(maker.Ident(oName), maker.Ident(type.name)));
+ JCUnary notInstanceOf = maker.Unary(Javac.getCtcInt(JCTree.class, "NOT"), maker.TypeTest(maker.Ident(oName), maker.Ident(type.name)));
statements.append(maker.If(notInstanceOf, returnBool(maker, false), null));
}
@@ -377,7 +377,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
JCExpression equalityCheck = maker.Apply(exprNil,
maker.Select(maker.Ident(otherName), typeNode.toName("canEqual")),
List.of(castThisRef));
- statements.append(maker.If(maker.Unary(Javac.getCTCint(JCTree.class, "NOT"), equalityCheck), returnBool(maker, false), null));
+ statements.append(maker.If(maker.Unary(Javac.getCtcInt(JCTree.class, "NOT"), equalityCheck), returnBool(maker, false), null));
}
}
@@ -386,7 +386,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
JCMethodInvocation callToSuper = maker.Apply(List.<JCExpression>nil(),
maker.Select(maker.Ident(typeNode.toName("super")), typeNode.toName("equals")),
List.<JCExpression>of(maker.Ident(oName)));
- JCUnary superNotEqual = maker.Unary(Javac.getCTCint(JCTree.class, "NOT"), callToSuper);
+ JCUnary superNotEqual = maker.Unary(Javac.getCtcInt(JCTree.class, "NOT"), callToSuper);
statements.append(maker.If(superNotEqual, returnBool(maker, false), null));
}
@@ -407,7 +407,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
default:
/* if (this.fieldName != other.fieldName) return false; */
statements.append(
- maker.If(maker.Binary(Javac.getCTCint(JCTree.class, "NE"), thisFieldAccessor, otherFieldAccessor), returnBool(maker, false), null));
+ maker.If(maker.Binary(Javac.getCtcInt(JCTree.class, "NE"), thisFieldAccessor, otherFieldAccessor), returnBool(maker, false), null));
break;
}
} else if (fType instanceof JCArrayTypeTree) {
@@ -418,18 +418,18 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
JCExpression eqMethod = chainDots(maker, typeNode, "java", "util", "Arrays", useDeepEquals ? "deepEquals" : "equals");
List<JCExpression> args = List.of(thisFieldAccessor, otherFieldAccessor);
- statements.append(maker.If(maker.Unary(Javac.getCTCint(JCTree.class, "NOT"),
+ statements.append(maker.If(maker.Unary(Javac.getCtcInt(JCTree.class, "NOT"),
maker.Apply(List.<JCExpression>nil(), eqMethod, args)), returnBool(maker, false), null));
} else /* objects */ {
/* if (this.fieldName == null ? other.fieldName != null : !this.fieldName.equals(other.fieldName)) return false; */
- JCExpression thisEqualsNull = maker.Binary(Javac.getCTCint(JCTree.class, "EQ"), thisFieldAccessor, maker.Literal(Javac.getCTCint(TypeTags.class, "BOT"), null));
- JCExpression otherNotEqualsNull = maker.Binary(Javac.getCTCint(JCTree.class, "NE"), otherFieldAccessor, maker.Literal(Javac.getCTCint(TypeTags.class, "BOT"), null));
+ JCExpression thisEqualsNull = maker.Binary(Javac.getCtcInt(JCTree.class, "EQ"), thisFieldAccessor, maker.Literal(Javac.getCtcInt(TypeTags.class, "BOT"), null));
+ JCExpression otherNotEqualsNull = maker.Binary(Javac.getCtcInt(JCTree.class, "NE"), otherFieldAccessor, maker.Literal(Javac.getCtcInt(TypeTags.class, "BOT"), null));
JCExpression equalsArg = createFieldAccessor(maker, fieldNode, fieldAccess, maker.Ident(otherName));
JCExpression castEqualsArg = maker.TypeCast(chainDots(maker, typeNode, "java", "lang", "Object"), equalsArg);
JCExpression thisEqualsThat = maker.Apply(List.<JCExpression>nil(),
maker.Select(createFieldAccessor(maker, fieldNode, fieldAccess), typeNode.toName("equals")),
List.of(castEqualsArg));
- JCExpression fieldsAreNotEqual = maker.Conditional(thisEqualsNull, otherNotEqualsNull, maker.Unary(Javac.getCTCint(JCTree.class, "NOT"), thisEqualsThat));
+ JCExpression fieldsAreNotEqual = maker.Conditional(thisEqualsNull, otherNotEqualsNull, maker.Unary(Javac.getCtcInt(JCTree.class, "NOT"), thisEqualsThat));
statements.append(maker.If(fieldsAreNotEqual, returnBool(maker, false), null));
}
}
@@ -451,7 +451,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
JCClassDecl type = (JCClassDecl) typeNode.get();
JCModifiers mods = maker.Modifiers(Flags.PUBLIC, List.<JCAnnotation>nil());
- JCExpression returnType = maker.TypeIdent(Javac.getCTCint(TypeTags.class, "BOOLEAN"));
+ JCExpression returnType = maker.TypeIdent(Javac.getCtcInt(TypeTags.class, "BOOLEAN"));
Name canEqualName = typeNode.toName("canEqual");
JCExpression objectType = chainDots(maker, typeNode, "java", "lang", "Object");
Name otherName = typeNode.toName("other");
@@ -468,12 +468,12 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
/* if (Float.compare(fieldName, other.fieldName) != 0) return false; */
JCExpression clazz = chainDots(maker, node, "java", "lang", isDouble ? "Double" : "Float");
List<JCExpression> args = List.of(thisDotField, otherDotField);
- JCBinary compareCallEquals0 = maker.Binary(Javac.getCTCint(JCTree.class, "NE"), maker.Apply(
+ JCBinary compareCallEquals0 = maker.Binary(Javac.getCtcInt(JCTree.class, "NE"), maker.Apply(
List.<JCExpression>nil(), maker.Select(clazz, node.toName("compare")), args), maker.Literal(0));
return maker.If(compareCallEquals0, returnBool(maker, false), null);
}
private JCStatement returnBool(TreeMaker maker, boolean bool) {
- return maker.Return(maker.Literal(Javac.getCTCint(TypeTags.class, "BOOLEAN"), bool ? 1 : 0));
+ return maker.Return(maker.Literal(Javac.getCtcInt(TypeTags.class, "BOOLEAN"), bool ? 1 : 0));
}
}
diff --git a/src/core/lombok/javac/handlers/HandleGetter.java b/src/core/lombok/javac/handlers/HandleGetter.java
index 0be00d89..a7e357ad 100644
--- a/src/core/lombok/javac/handlers/HandleGetter.java
+++ b/src/core/lombok/javac/handlers/HandleGetter.java
@@ -260,14 +260,14 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
private static final java.util.Map<Integer, String> TYPE_MAP;
static {
Map<Integer, String> m = new HashMap<Integer, String>();
- 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");
+ 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);
}
@@ -327,7 +327,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
innerIfStatements.append(statement);
}
- JCBinary isNull = maker.Binary(JCTree.EQ, maker.Ident(valueName), maker.Literal(Javac.getCTCint(TypeTags.class, "BOT"), null));
+ JCBinary isNull = maker.Binary(Javac.getCtcInt(JCTree.class, "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);
}
@@ -335,7 +335,7 @@ public class HandleGetter extends 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(Javac.getCTCint(TypeTags.class, "BOT"), null));
+ JCBinary isNull = maker.Binary(Javac.getCtcInt(JCTree.class, "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);
}
diff --git a/src/core/lombok/javac/handlers/HandleSetter.java b/src/core/lombok/javac/handlers/HandleSetter.java
index 8e29d974..d899336f 100644
--- a/src/core/lombok/javac/handlers/HandleSetter.java
+++ b/src/core/lombok/javac/handlers/HandleSetter.java
@@ -211,7 +211,7 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
List<JCAnnotation> annsOnParam = nonNulls.appendList(nullables);
JCVariableDecl param = treeMaker.VarDef(treeMaker.Modifiers(Flags.FINAL, annsOnParam), fieldDecl.name, fieldDecl.vartype, null);
//WARNING: Do not use field.getSymbolTable().voidType - that field has gone through non-backwards compatible API changes within javac1.6.
- JCExpression methodType = treeMaker.Type(new JCNoType(Javac.getCTCint(TypeTags.class, "VOID")));
+ JCExpression methodType = treeMaker.Type(new JCNoType(Javac.getCtcInt(TypeTags.class, "VOID")));
List<JCTypeParameter> methodGenericParams = List.nil();
List<JCVariableDecl> parameters = List.of(param);
@@ -229,8 +229,8 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
@Override
public TypeKind getKind() {
- if (tag == Javac.getCTCint(TypeTags.class, "VOID")) return TypeKind.VOID;
- if (tag == Javac.getCTCint(TypeTags.class, "NONE")) return TypeKind.NONE;
+ if (tag == Javac.getCtcInt(TypeTags.class, "VOID")) return TypeKind.VOID;
+ if (tag == Javac.getCtcInt(TypeTags.class, "NONE")) return TypeKind.NONE;
throw new AssertionError("Unexpected tag: " + tag);
}
diff --git a/src/core/lombok/javac/handlers/HandleSynchronized.java b/src/core/lombok/javac/handlers/HandleSynchronized.java
index 779adc26..fa4a0474 100644
--- a/src/core/lombok/javac/handlers/HandleSynchronized.java
+++ b/src/core/lombok/javac/handlers/HandleSynchronized.java
@@ -86,7 +86,7 @@ public class HandleSynchronized extends JavacAnnotationHandler<Synchronized> {
JCExpression objectType = chainDots(maker, methodNode, "java", "lang", "Object");
//We use 'new Object[0];' because unlike 'new Object();', empty arrays *ARE* serializable!
JCNewArray newObjectArray = maker.NewArray(chainDots(maker, methodNode, "java", "lang", "Object"),
- List.<JCExpression>of(maker.Literal(Javac.getCTCint(TypeTags.class, "INT"), 0)), null);
+ List.<JCExpression>of(maker.Literal(Javac.getCtcInt(TypeTags.class, "INT"), 0)), null);
JCVariableDecl fieldDecl = Javac.recursiveSetGeneratedBy(maker.VarDef(
maker.Modifiers(Flags.PRIVATE | Flags.FINAL | (isStatic ? Flags.STATIC : 0)),
methodNode.toName(lockName), objectType, newObjectArray), ast);
diff --git a/src/core/lombok/javac/handlers/HandleToString.java b/src/core/lombok/javac/handlers/HandleToString.java
index 5c538460..06e70e7a 100644
--- a/src/core/lombok/javac/handlers/HandleToString.java
+++ b/src/core/lombok/javac/handlers/HandleToString.java
@@ -197,7 +197,7 @@ public class HandleToString extends JavacAnnotationHandler<ToString> {
JCMethodInvocation callToSuper = maker.Apply(List.<JCExpression>nil(),
maker.Select(maker.Ident(typeNode.toName("super")), typeNode.toName("toString")),
List.<JCExpression>nil());
- current = maker.Binary(Javac.getCTCint(JCTree.class, "PLUS"), current, callToSuper);
+ current = maker.Binary(Javac.getCtcInt(JCTree.class, "PLUS"), current, callToSuper);
first = false;
}
@@ -217,21 +217,21 @@ public class HandleToString extends JavacAnnotationHandler<ToString> {
} else expr = fieldAccessor;
if (first) {
- current = maker.Binary(Javac.getCTCint(JCTree.class, "PLUS"), current, expr);
+ current = maker.Binary(Javac.getCtcInt(JCTree.class, "PLUS"), current, expr);
first = false;
continue;
}
if (includeFieldNames) {
- current = maker.Binary(Javac.getCTCint(JCTree.class, "PLUS"), current, maker.Literal(infix + fieldNode.getName() + "="));
+ current = maker.Binary(Javac.getCtcInt(JCTree.class, "PLUS"), current, maker.Literal(infix + fieldNode.getName() + "="));
} else {
- current = maker.Binary(Javac.getCTCint(JCTree.class, "PLUS"), current, maker.Literal(infix));
+ current = maker.Binary(Javac.getCtcInt(JCTree.class, "PLUS"), current, maker.Literal(infix));
}
- current = maker.Binary(Javac.getCTCint(JCTree.class, "PLUS"), current, expr);
+ current = maker.Binary(Javac.getCtcInt(JCTree.class, "PLUS"), current, expr);
}
- if (!first) current = maker.Binary(Javac.getCTCint(JCTree.class, "PLUS"), current, maker.Literal(suffix));
+ if (!first) current = maker.Binary(Javac.getCtcInt(JCTree.class, "PLUS"), current, maker.Literal(suffix));
JCStatement returnStatement = maker.Return(current);
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
index 03a9142b..c733304b 100644
--- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java
+++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java
@@ -566,7 +566,7 @@ public class JavacHandlerUtil {
JCExpression npe = chainDots(treeMaker, variable, "java", "lang", "NullPointerException");
JCTree exception = treeMaker.NewClass(null, List.<JCExpression>nil(), npe, List.<JCExpression>of(treeMaker.Literal(fieldName.toString())), null);
JCStatement throwStatement = treeMaker.Throw(exception);
- return treeMaker.If(treeMaker.Binary(Javac.getCTCint(JCTree.class, "EQ"), treeMaker.Ident(fieldName), treeMaker.Literal(Javac.getCTCint(TypeTags.class, "BOT"), null)), throwStatement, null);
+ return treeMaker.If(treeMaker.Binary(Javac.getCtcInt(JCTree.class, "EQ"), treeMaker.Ident(fieldName), treeMaker.Literal(Javac.getCtcInt(TypeTags.class, "BOT"), null)), throwStatement, null);
}
/**