diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-01-30 15:49:36 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2015-01-30 15:49:36 +0100 |
commit | 26b2fb5cd6d4d73b270be3787fa876cc1bfe80f2 (patch) | |
tree | c3cccc68a0a4da222966fef26d096725b678b14a /src/core/lombok | |
parent | a7bd812893ecb1fa603229d81c924823426ea973 (diff) | |
download | lombok-26b2fb5cd6d4d73b270be3787fa876cc1bfe80f2.tar.gz lombok-26b2fb5cd6d4d73b270be3787fa876cc1bfe80f2.tar.bz2 lombok-26b2fb5cd6d4d73b270be3787fa876cc1bfe80f2.zip |
* the j.u.List recipe is now used to singularize java.lang.Iterables.
* Code gen for builder now adheres to format options when delomboking (doesn’t generate java.lang. FQNs if you ask it not to do that).
Diffstat (limited to 'src/core/lombok')
4 files changed, 4 insertions, 4 deletions
diff --git a/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSingularizer.java b/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSingularizer.java index 0a9eaf75..576115b0 100644 --- a/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSingularizer.java +++ b/src/core/lombok/eclipse/handlers/singulars/EclipseJavaUtilListSingularizer.java @@ -53,7 +53,7 @@ import org.mangosdk.spi.ProviderFor; @ProviderFor(EclipseSingularizer.class) public class EclipseJavaUtilListSingularizer extends EclipseJavaUtilListSetSingularizer { @Override public LombokImmutableList<String> getSupportedTypes() { - return LombokImmutableList.of("java.util.List", "java.util.Collection", "java.util.Iterable"); + return LombokImmutableList.of("java.util.List", "java.util.Collection", "java.lang.Iterable"); } @Override public void appendBuildCode(SingularData data, EclipseNode builderType, List<Statement> statements, char[] targetVariableName) { diff --git a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java index 2474ce7b..e23837dc 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacGuavaSingularizer.java @@ -140,7 +140,7 @@ abstract class JavacGuavaSingularizer extends JavacSingularizer { if (mapMode) { paramType = chainDots(builderType, "java", "util", "Map"); } else { - paramType = chainDots(builderType, "java", "lang", "Iterable"); + paramType = genJavaLangTypeRef(builderType, "Iterable"); } paramType = addTypeArgs(mapMode ? 2 : 1, true, builderType, paramType, data.getTypeArgs(), source); JCVariableDecl param = maker.VarDef(maker.Modifiers(paramFlags), data.getPluralName(), paramType, null); diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSingularizer.java index 65e91fa0..9ec77e78 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilListSingularizer.java @@ -43,7 +43,7 @@ import com.sun.tools.javac.util.Name; @ProviderFor(JavacSingularizer.class) public class JavacJavaUtilListSingularizer extends JavacJavaUtilListSetSingularizer { @Override public LombokImmutableList<String> getSupportedTypes() { - return LombokImmutableList.of("java.util.List", "java.util.Collection", "java.util.Iterable"); + return LombokImmutableList.of("java.util.List", "java.util.Collection", "java.lang.Iterable"); } @Override public void appendBuildCode(SingularData data, JavacNode builderType, JCTree source, ListBuffer<JCStatement> statements, Name targetVariableName) { diff --git a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilSingularizer.java b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilSingularizer.java index c75dfbdd..f419a014 100644 --- a/src/core/lombok/javac/handlers/singulars/JavacJavaUtilSingularizer.java +++ b/src/core/lombok/javac/handlers/singulars/JavacJavaUtilSingularizer.java @@ -137,7 +137,7 @@ abstract class JavacJavaUtilSingularizer extends JavacSingularizer { // this.varName.size() < MAX_POWER_OF_2 ? 1 + this.varName.size() + (this.varName.size() - 3) / 3 : Integer.MAX_VALUE; // lessThanCutOff = this.varName.size() < MAX_POWER_OF_2 JCExpression lessThanCutoff = maker.Binary(CTC_LESS_THAN, getSize(maker, builderType, varName, nullGuard), maker.Literal(CTC_INT, 0x40000000)); - JCExpression integerMaxValue = chainDots(builderType, "java", "lang", "Integer", "MAX_VALUE"); + JCExpression integerMaxValue = genJavaLangTypeRef(builderType, "Integer", "MAX_VALUE"); JCExpression sizeFormulaLeft = maker.Binary(CTC_PLUS, maker.Literal(CTC_INT, 1), getSize(maker, builderType, varName, nullGuard)); JCExpression sizeFormulaRightLeft = maker.Binary(CTC_MINUS, getSize(maker, builderType, varName, nullGuard), maker.Literal(CTC_INT, 3)); JCExpression sizeFormulaRight = maker.Binary(CTC_DIV, sizeFormulaRightLeft, maker.Literal(CTC_INT, 3)); |