From 844b36b47c9fec02473b5d27c74c10f10d5c5fc2 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Tue, 16 Aug 2011 00:18:32 +0200 Subject: Renamed Javac.getCTCint to getCtcInt Made delombok work with multiple JavaCompiler's on the classpath Made @Getter(lazy=true) work on javac7 (fixes issue#223) --- src/core/lombok/javac/Javac.java | 2 +- src/core/lombok/javac/JavacResolution.java | 24 ++++++------ src/core/lombok/javac/handlers/HandleCleanup.java | 2 +- .../javac/handlers/HandleEqualsAndHashCode.java | 44 +++++++++++----------- src/core/lombok/javac/handlers/HandleGetter.java | 20 +++++----- src/core/lombok/javac/handlers/HandleSetter.java | 6 +-- .../lombok/javac/handlers/HandleSynchronized.java | 2 +- src/core/lombok/javac/handlers/HandleToString.java | 12 +++--- .../lombok/javac/handlers/JavacHandlerUtil.java | 2 +- 9 files changed, 57 insertions(+), 57 deletions(-) (limited to 'src/core') 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 { maker.Apply(List.nil(), cleanupMethod, List.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 JavacAnnotationHandlernil()); 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 statements = ListBuffer.lb(); Name primeName = typeNode.toName("PRIME"); @@ -219,12 +219,12 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler intoResult = ListBuffer.lb(); @@ -289,7 +289,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandlernil(), maker.Select(createFieldAccessor(maker, fieldNode, fieldAccess), typeNode.toName("hashCode")), List.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>> 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 fields, boolean callSuper, FieldAccess fieldAccess, boolean needsCanEqual, JCTree source) { @@ -331,18 +331,18 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandlernil()); 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 statements = ListBuffer.lb(); final List 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 JavacAnnotationHandlernil(), maker.Select(maker.Ident(typeNode.toName("super")), typeNode.toName("equals")), List.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 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.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.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 JavacAnnotationHandlernil()); - 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 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.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 { private static final java.util.Map TYPE_MAP; static { Map m = new HashMap(); - 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 { 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 { 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.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 { List 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 methodGenericParams = List.nil(); List parameters = List.of(param); @@ -229,8 +229,8 @@ public class HandleSetter extends JavacAnnotationHandler { @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 { 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.of(maker.Literal(Javac.getCTCint(TypeTags.class, "INT"), 0)), null); + List.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 { JCMethodInvocation callToSuper = maker.Apply(List.nil(), maker.Select(maker.Ident(typeNode.toName("super")), typeNode.toName("toString")), List.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 { } 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.nil(), npe, List.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); } /** -- cgit