Merge remote-tracking branch 'upstream/master'

# Conflicts:
#	src/core/lombok/eclipse/handlers/HandleBuilder.java
#	src/core/lombok/eclipse/handlers/HandleConstructor.java
#	src/core/lombok/javac/handlers/HandleBuilder.java
#	src/core/lombok/javac/handlers/HandleConstructor.java
This commit is contained in:
Jan Rieke committed 2017-03-13 16:49:20 +01:00
commit 2346b15c8d
332 files changed
+2279 -1957

No files matched your search

+8 -2
View File
@@ -232,7 +232,13 @@ lombok.launch.AnnotationProcessorHider$ClaimingProcessor</echo>
<echo file="build/lombok/META-INF/services/org.mapstruct.ap.spi.AstModifyingAnnotationProcessor">lombok.launch.AnnotationProcessorHider$AstModificationNotifier</echo>
</target>
<target name="dist" description="Builds THE lombok.jar file which contains everything." depends="version, compile">
<target name="-latestChanges" depends="version">
<ant antfile="buildScripts/website.ant.xml" target="latestChanges" inheritAll="false">
<property name="lombok.version" value="${lombok.version}" />
</ant>
</target>
<target name="dist" description="Builds THE lombok.jar file which contains everything." depends="version, compile, -latestChanges">
<mkdir dir="dist" />
<copy file="doc/changelog.markdown" tofile="build/changelog.txt" />
<tstamp>
@@ -240,7 +246,7 @@ lombok.launch.AnnotationProcessorHider$ClaimingProcessor</echo>
</tstamp>
<echo file="release-timestamp.txt">${releaseTimestamp}</echo>
<zip destfile="dist/lombok-${lombok.version}.jar">
<fileset dir="build" includes="changelog.txt" />
<fileset dir="build" includes="changelog.txt, latestchanges.html" />
<fileset dir="." includes="LICENSE" />
<fileset dir="." includes="AUTHORS" />
<fileset dir="." includes="release-timestamp.txt" />
@@ -1,18 +1,20 @@
package lombok.website;
import com.petebevin.markdown.MarkdownProcessor;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.petebevin.markdown.MarkdownProcessor;
public class CompileChangelog {
public static void main(String[] args) {
String fileIn = args[0];
String fileOut = args[1];
boolean edge = args.length > 3 && "-edge".equals(args[2]);
String version = edge ? args[3] : null;
boolean latest = args.length > 3 && "-latest".equals(args[2]);
String version = args.length > 3 ? args[3] : null;
try {
FileInputStream in = new FileInputStream(fileIn);
@@ -27,7 +29,14 @@ public class CompileChangelog {
in.close();
String markdown = new String(out.toByteArray(), "UTF-8");
String result = edge ? buildEdge(markdown, version) : build(markdown);
String result;
if (edge) {
result = buildEdge(sectionByVersion(markdown, version));
} else if (latest) {
result = buildLatest(sectionByVersion(markdown, version));
} else {
result = build(markdown);
}
FileOutputStream file = new FileOutputStream(fileOut);
file.write(result.getBytes("UTF-8"));
@@ -43,9 +52,19 @@ public class CompileChangelog {
return new MarkdownProcessor().markdown(markdown);
}
private static final Pattern LAST_CHANGELOG = Pattern.compile(
"^.*### v$", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
private static String buildEdge(String markdown, String version) {
private static String buildEdge(String section) {
String latest = section != null ? section : "* No changelog records for this edge release.";
return new MarkdownProcessor().markdown(latest);
}
private static String buildLatest(String section) {
String latest = section != null ? section : "* No changelog records for this release.";
String noIssueLinks = latest.replaceAll("\\[[^]]*[Ii]ssue[^]]*\\]\\([^)]*\\)", "");
String noLinks = noIssueLinks.replaceAll("\\[([^]]*)\\]\\([^)]*\\)", "$1");
return new MarkdownProcessor().markdown(noLinks);
}
private static String sectionByVersion(String markdown, String version) {
if (version.toUpperCase().endsWith("-HEAD") || version.toUpperCase().endsWith("-EDGE")) {
version = version.substring(0, version.length() - 5);
}
@@ -53,7 +72,6 @@ public class CompileChangelog {
Pattern p = Pattern.compile(
"(?is-m)^.*###\\s*v" + version + ".*?\n(.*?)(?:###\\s*v.*)?$");
Matcher m = p.matcher(markdown);
String subMarkdown = m.matches() ? m.group(1) : "* No changelog records for this edge release.";
return new MarkdownProcessor().markdown(subMarkdown);
return m.matches() ? m.group(1) : null;
}
}
}
+13
View File
@@ -243,6 +243,19 @@ such as converting the changelog into HTML, and creating javadoc.
</copy>
</target>
<target name="latestChanges" depends="-compile-webclasses, version">
<java fork="true" classname="lombok.website.CompileChangelog" failonerror="true">
<classpath>
<path refid="build.path" />
<pathelement location="build/webclasses" />
</classpath>
<arg value="doc/changelog.markdown" />
<arg value="build/latestchanges.html" />
<arg value="-latest" />
<arg value="${lombok.version}" />
</java>
</target>
<target name="edgeRelease-build" depends="-compile-webclasses, version">
<mkdir dir="build/website-edge" />
<property name="CHANGELOG_FILE" location="doc/changelog.markdown" />
+10 -5
View File
@@ -1,11 +1,16 @@
Lombok Changelog
----------------
### v1.16.13 "Edgy Guinea Pig"
* v1.16.12 is the latest stable release of Project Lombok.
* FEATURE: Generated classes, methods and fields are now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014)
* PLATFORM: Lombok can now be used together with other annotation processors that are looking for lombok-generated methods, but only if lombok is the first annotation processor executed. The most commonly used annotation processor affected by this change is [MapStruct](http://mapstruct.org/); we've worked with the mapstruct team specifically to allow any order. Other annotation processors might follow the framework we've built to make this possible; point the authors of any such processor to us and we'll get it sorted. [MapStruct issue #510](https://github.com/mapstruct/mapstruct/issues/510) [Lombok issue #973](https://github.com/rzwitserloot/lombok/issues/973).
* PLATFORM: Eclipse: Refactor script 'rename field' when lombok has also generated getters and/or setters for this field is nicer now [Issue #210](https://github.com/rzwitserloot/lombok/issues/210).
### v1.16.15 "Edgy Guinea Pig"
* v1.16.14 is the latest stable release of Project Lombok.
* PLATFORM: Improved jdk9 support, work in progress.
* BUGFIX: The `onX` feature (which lets you add annotations to generated methods) did not work if the annotation you added contained named parameters, and you are compiling with JDK8's javac. We can't fix this (it's a bug in javac), but we have provided an alternate, prettier way to do `onX` on javac8+. [Issue #778](https://github.com/rzwitserloot/lombok/issues/778) [onX documentation](https://projectlombok.org/features/experimental/onX.html)
### v1.16.14 (February 10th, 2017)
* FEATURE: Generated classes, methods and fields can now also annotated with `@lombok.Generated` [Issue #1014](https://github.com/rzwitserloot/lombok/issues/1014)<br>
* PLATFORM: Lombok can now be used together with other annotation processors that are looking for lombok-generated methods, but only if lombok is the first annotation processor executed. The most commonly used annotation processor affected by this change is [MapStruct](http://mapstruct.org/); we've worked with the mapstruct team specifically to allow any order. Other annotation processors might follow the framework we've built to make this possible; point the authors of any such processor to us and we'll get it sorted [MapStruct issue #510](https://github.com/mapstruct/mapstruct/issues/510) [Lombok issue #973](https://github.com/rzwitserloot/lombok/issues/973)
* PLATFORM: Eclipse: Refactor script 'rename field' when lombok has also generated getters and/or setters for this field is nicer now [Issue #210](https://github.com/rzwitserloot/lombok/issues/210)
* BUGFIX: Something you never encountered. [Issue #1274](https://github.com/rzwitserloot/lombok/issues/1274)
### v1.16.12 (December 5th, 2016)
* FEATURE: `var` is the mutable sister of `val`. For now experimental, and opt-in using `ALLOW` in the flagUsage configuration key. Thanks for the contribution, Bulgakov Alexander.
+6 -11
View File
@@ -49,7 +49,12 @@ public @interface AllArgsConstructor {
String staticName() default "";
/**
* Any annotations listed here are put on the generated constructor. The syntax for this feature is: {@code @AllArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}
* Any annotations listed here are put on the generated constructor.
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @AllArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @AllArgsConstructor(onConstructor_={@AnnotationsGohere})} // note the underscore after {@code onConstructor}.
*/
AnyAnnotation[] onConstructor() default {};
@@ -58,16 +63,6 @@ public @interface AllArgsConstructor {
*/
AccessLevel access() default lombok.AccessLevel.PUBLIC;
/**
* Constructors are generated with the {@link java.beans.ConstructorProperties} annotation.
* However, this annotation is new in 1.6 which means those compiling for 1.5 will need
* to set this value to true.
*
* @deprecated THIS FEATURE WILL BE REMOVED after March 31st 2015. Use configuration key {@link ConfigurationKeys#ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES} instead.
*/
@Deprecated
boolean suppressConstructorProperties() default false;
/**
* Placeholder annotation to enable the placement of annotations on the generated code.
* @deprecated Don't use this annotation, ever - Read the documentation.
+6 -8
View File
@@ -41,30 +41,28 @@ public class ConfigurationKeys {
/**
* lombok configuration: {@code lombok.addGeneratedAnnotation} = {@code true} | {@code false}.
*
* If unset or {@code true}, lombok generates various annotations to mark generated code like {@code @javax.annotation.Generated("lombok")} and {@code @lombok.Generated}.
* If unset or {@code true}, lombok generates {@code @javax.annotation.Generated("lombok")} on all fields, methods, and types that are generated, unless {@code lombok.addJavaxGeneratedAnnotation} is set.
*
* @see ConfigurationKeys#ADD_JAVAX_GENERATED_ANNOTATIONS
* @see ConfigurationKeys#ADD_LOMBOK_GENERATED_ANNOTATIONS
* @deprecated Since version 1.16.14, use {@link #ADD_JAVAX_GENERATED_ANNOTATIONS} instead.
*/
public static final ConfigurationKey<Boolean> ADD_GENERATED_ANNOTATIONS = new ConfigurationKey<Boolean>("lombok.addGeneratedAnnotation", "Generate @javax.annotation.Generated on all generated code (default: true).") {};
@Deprecated
public static final ConfigurationKey<Boolean> ADD_GENERATED_ANNOTATIONS = new ConfigurationKey<Boolean>("lombok.addGeneratedAnnotation", "Generate @javax.annotation.Generated on all generated code (default: true). Deprecated, use 'lombok.addJavaxGeneratedAnnotation' instead.") {};
/**
* lombok configuration: {@code lombok.addJavaxGeneratedAnnotation} = {@code true} | {@code false}.
*
* If unset or {@code true}, lombok generates {@code @javax.annotation.Generated("lombok")} on all fields, methods, and types that are generated, unless {@code lombok.addGeneratedAnnotation} is set to {@code false}.
*
* @see ConfigurationKeys#ADD_GENERATED_ANNOTATIONS
*/
public static final ConfigurationKey<Boolean> ADD_JAVAX_GENERATED_ANNOTATIONS = new ConfigurationKey<Boolean>("lombok.addJavaxGeneratedAnnotation", "Generate @javax.annotation.Generated on all generated code (default: follow lombok.addGeneratedAnnotation).") {};
/**
* lombok configuration: {@code lombok.addLombokGeneratedAnnotation} = {@code true} | {@code false}.
*
* If unset or {@code true}, lombok generates {@code @lombok.Generated} on all fields, methods, and types that are generated, unless {@code lombok.addGeneratedAnnotation} is set to {@code false}.
*
* @see ConfigurationKeys#ADD_GENERATED_ANNOTATIONS
* If {@code true}, lombok generates {@code @lombok.Generated} on all fields, methods, and types that are generated.
*/
public static final ConfigurationKey<Boolean> ADD_LOMBOK_GENERATED_ANNOTATIONS = new ConfigurationKey<Boolean>("lombok.addLombokGeneratedAnnotation", "Generate @lombok.Generated on all generated code (default: follow lombok.addGeneratedAnnotation).") {};
public static final ConfigurationKey<Boolean> ADD_LOMBOK_GENERATED_ANNOTATIONS = new ConfigurationKey<Boolean>("lombok.addLombokGeneratedAnnotation", "Generate @lombok.Generated on all generated code (default: false).") {};
/**
* lombok configuration: {@code lombok.extern.findbugs.addSuppressFBWarnings} = {@code true} | {@code false}.
+7 -2
View File
@@ -63,8 +63,13 @@ public @interface EqualsAndHashCode {
boolean doNotUseGetters() default false;
/**
* Any annotations listed here are put on the generated parameter of {@code equals} and {@code canEqual}. The syntax for this feature is: {@code @EqualsAndHashCode(onParam=@__({@AnnotationsGoHere}))}
* This is useful to add for example a {@code Nullable} annotation.
* Any annotations listed here are put on the generated parameter of {@code equals} and {@code canEqual}.
* This is useful to add for example a {@code Nullable} annotation.<br />
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @EqualsAndHashCode(onParam=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @EqualsAndHashCode(onParam_={@AnnotationsGohere})} // note the underscore after {@code onParam}.
*/
AnyAnnotation[] onParam() default {};
+7 -2
View File
@@ -58,9 +58,14 @@ public @interface Getter {
lombok.AccessLevel value() default lombok.AccessLevel.PUBLIC;
/**
* Any annotations listed here are put on the generated method. The syntax for this feature is: {@code @Getter(onMethod=@__({@AnnotationsGoHere}))}
* Any annotations listed here are put on the generated method.
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @Getter(onMethod=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @Getter(onMethod_={@AnnotationsGohere})} // note the underscore after {@code onMethod}.
*/
AnyAnnotation[] onMethod() default @AnyAnnotation;
AnyAnnotation[] onMethod() default {};
boolean lazy() default false;
+6 -1
View File
@@ -51,7 +51,12 @@ public @interface NoArgsConstructor {
String staticName() default "";
/**
* Any annotations listed here are put on the generated constructor. The syntax for this feature is: {@code @NoArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}
* Any annotations listed here are put on the generated constructor.
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @NoArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @NoArgsConstructor(onConstructor_={@AnnotationsGohere})} // note the underscore after {@code onConstructor}.
*/
AnyAnnotation[] onConstructor() default {};
+6 -11
View File
@@ -49,7 +49,12 @@ public @interface RequiredArgsConstructor {
String staticName() default "";
/**
* Any annotations listed here are put on the generated constructor. The syntax for this feature is: {@code @RequiredArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}
* Any annotations listed here are put on the generated constructor.
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @RequiredArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @RequiredArgsConstructor(onConstructor_={@AnnotationsGohere})} // note the underscore after {@code onConstructor}.
*/
AnyAnnotation[] onConstructor() default {};
@@ -58,16 +63,6 @@ public @interface RequiredArgsConstructor {
*/
AccessLevel access() default lombok.AccessLevel.PUBLIC;
/**
* Constructors are generated with the {@link java.beans.ConstructorProperties} annotation.
* However, this annotation is new in 1.6 which means those compiling for 1.5 will need
* to set this value to true.
*
* @deprecated THIS FEATURE WILL BE REMOVED after March 31st 2015. Use configuration key {@link ConfigurationKeys#ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES} instead.
*/
@Deprecated
boolean suppressConstructorProperties() default false;
/**
* Placeholder annotation to enable the placement of annotations on the generated code.
* @deprecated Don't use this annotation, ever - Read the documentation.
+12 -2
View File
@@ -59,12 +59,22 @@ public @interface Setter {
lombok.AccessLevel value() default lombok.AccessLevel.PUBLIC;
/**
* Any annotations listed here are put on the generated method. The syntax for this feature is: {@code @Setter(onMethod=@__({@AnnotationsGoHere}))}
* Any annotations listed here are put on the generated method.
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @Setter(onMethod=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @Setter(onMethod_={@AnnotationsGohere})} // note the underscore after {@code onMethod}.
*/
AnyAnnotation[] onMethod() default {};
/**
* Any annotations listed here are put on the generated method's parameter. The syntax for this feature is: {@code @Setter(onParam=@__({@AnnotationsGoHere}))}
* Any annotations listed here are put on the generated method's parameter.
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @Setter(onParam=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @Setter(onParam_={@AnnotationsGohere})} // note the underscore after {@code onParam}.
*/
AnyAnnotation[] onParam() default {};
+1 -1
View File
@@ -30,7 +30,7 @@ public class Version {
// ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries).
// Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example.
// Official builds always end in an even number. (Since 0.10.2).
private static final String VERSION = "1.16.13";
private static final String VERSION = "1.16.15";
private static final String RELEASE_NAME = "Edgy Guinea Pig";
// private static final String RELEASE_NAME = "Candid Duck";
@@ -109,8 +109,9 @@ public class HandlerUtil {
}
}
public static boolean shouldAddGenerated(LombokNode<?, ?, ?> node, ConfigurationKey<Boolean> key) {
Boolean add = node.getAst().readConfiguration(key);
@SuppressWarnings("deprecation")
public static boolean shouldAddGenerated(LombokNode<?, ?, ?> node) {
Boolean add = node.getAst().readConfiguration(ConfigurationKeys.ADD_JAVAX_GENERATED_ANNOTATIONS);
if (add != null) return add;
return !Boolean.FALSE.equals(node.getAst().readConfiguration(ConfigurationKeys.ADD_GENERATED_ANNOTATIONS));
}
@@ -1345,10 +1345,10 @@ public class EclipseHandlerUtil {
public static Annotation[] addGenerated(EclipseNode node, ASTNode source, Annotation[] originalAnnotationArray) {
Annotation[] result = originalAnnotationArray;
if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_JAVAX_GENERATED_ANNOTATIONS)) {
if (HandlerUtil.shouldAddGenerated(node)) {
result = addAnnotation(source, result, JAVAX_ANNOTATION_GENERATED, new StringLiteral(LOMBOK, 0, 0, 0));
}
if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS)) {
if (Boolean.TRUE.equals(node.getAst().readConfiguration(ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS))) {
result = addAnnotation(source, result, LOMBOK_GENERATED, null);
}
return result;
@@ -1616,6 +1616,14 @@ public class EclipseHandlerUtil {
return true;
}
public static void addError(String errorName, EclipseNode node) {
if (node.getLatestJavaSpecSupported() < 8) {
node.addError("The correct format is " + errorName + "_={@SomeAnnotation, @SomeOtherAnnotation})");
} else {
node.addError("The correct format is " + errorName + "=@__({@SomeAnnotation, @SomeOtherAnnotation}))");
}
}
public static List<Annotation> unboxAndRemoveAnnotationParameter(Annotation annotation, String annotationName, String errorName, EclipseNode errorNode) {
if ("value".equals(annotationName)) {
// We can't unbox this, because SingleMemberAnnotation REQUIRES a value, and this method
@@ -1638,51 +1646,70 @@ public class EclipseHandlerUtil {
char[] nameAsCharArray = annotationName.toCharArray();
top:
for (int i = 0; i < pairs.length; i++) {
if (pairs[i].name == null || !Arrays.equals(nameAsCharArray, pairs[i].name)) continue;
boolean allowRaw;
char[] name = pairs[i].name;
if (name == null) continue;
if (name.length < nameAsCharArray.length) continue;
for (int j = 0; j < nameAsCharArray.length; j++) {
if (name[j] != nameAsCharArray[j]) continue top;
}
allowRaw = name.length > nameAsCharArray.length;
for (int j = nameAsCharArray.length; j < name.length; j++) {
if (name[j] != '_') continue top;
}
// If we're still here it's the targeted annotation param.
Expression value = pairs[i].value;
MemberValuePair[] newPairs = new MemberValuePair[pairs.length - 1];
if (i > 0) System.arraycopy(pairs, 0, newPairs, 0, i);
if (i < pairs.length - 1) System.arraycopy(pairs, i + 1, newPairs, i, pairs.length - i - 1);
normalAnnotation.memberValuePairs = newPairs;
// We have now removed the annotation parameter and stored '@__({... annotations ...})',
// which we must now unbox.
if (!(value instanceof Annotation)) {
errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
return Collections.emptyList();
}
Annotation atDummyIdentifier = (Annotation) value;
if (!(atDummyIdentifier.type instanceof SingleTypeReference) ||
!isAllValidOnXCharacters(((SingleTypeReference) atDummyIdentifier.type).token)) {
errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
return Collections.emptyList();
}
if (atDummyIdentifier instanceof MarkerAnnotation) {
// It's @Getter(onMethod=@__). This is weird, but fine.
return Collections.emptyList();
}
// We have now removed the annotation parameter and stored the value,
// which we must now unbox. It's either annotations, or @__(annotations).
Expression content = null;
if (atDummyIdentifier instanceof NormalAnnotation) {
MemberValuePair[] mvps = ((NormalAnnotation) atDummyIdentifier).memberValuePairs;
if (mvps == null || mvps.length == 0) {
// It's @Getter(onMethod=@__()). This is weird, but fine.
if (value instanceof ArrayInitializer) {
if (!allowRaw) {
addError(errorName, errorNode);
return Collections.emptyList();
}
if (mvps.length == 1 && Arrays.equals("value".toCharArray(), mvps[0].name)) {
content = mvps[0].value;
content = value;
} else if (!(value instanceof Annotation)) {
addError(errorName, errorNode);
return Collections.emptyList();
} else {
Annotation atDummyIdentifier = (Annotation) value;
if (atDummyIdentifier.type instanceof SingleTypeReference && isAllValidOnXCharacters(((SingleTypeReference) atDummyIdentifier.type).token)) {
if (atDummyIdentifier instanceof MarkerAnnotation) {
return Collections.emptyList();
} else if (atDummyIdentifier instanceof NormalAnnotation) {
MemberValuePair[] mvps = ((NormalAnnotation) atDummyIdentifier).memberValuePairs;
if (mvps == null || mvps.length == 0) {
return Collections.emptyList();
}
if (mvps.length == 1 && Arrays.equals("value".toCharArray(), mvps[0].name)) {
content = mvps[0].value;
}
} else if (atDummyIdentifier instanceof SingleMemberAnnotation) {
content = ((SingleMemberAnnotation) atDummyIdentifier).memberValue;
} else {
addError(errorName, errorNode);
return Collections.emptyList();
}
} else {
if (allowRaw) {
content = atDummyIdentifier;
} else {
addError(errorName, errorNode);
return Collections.emptyList();
}
}
}
if (atDummyIdentifier instanceof SingleMemberAnnotation) {
content = ((SingleMemberAnnotation) atDummyIdentifier).memberValue;
}
if (content == null) {
errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
addError(errorName, errorNode);
return Collections.emptyList();
}
@@ -1694,13 +1721,13 @@ public class EclipseHandlerUtil {
if (expressions != null) for (Expression ex : expressions) {
if (ex instanceof Annotation) result.add((Annotation) ex);
else {
errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
addError(errorName, errorNode);
return Collections.emptyList();
}
}
return result;
} else {
errorNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
addError(errorName, errorNode);
return Collections.emptyList();
}
}
@@ -205,7 +205,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
}
boolean callBuilderBasedSuperConstructor = inherit && td.superclass != null;
new HandleConstructor().generateConstructor(tdParent, AccessLevel.PROTECTED, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER, true,
new HandleConstructor().generateConstructor(tdParent, extendable ? AccessLevel.PROTECTED : AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER,
Collections.<Annotation>emptyList(), annotationNode, extendable ? builderClassName : null, callBuilderBasedSuperConstructor);
returnType = namePlusTypeParamsToTypeReference(td.name, td.typeParameters, p);
@@ -426,7 +426,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
if (constructorExists(builderType) == MemberExistsResult.NOT_EXISTS) {
ConstructorDeclaration cd = HandleConstructor.createConstructor(
AccessLevel.PACKAGE, builderType, Collections.<EclipseNode>emptyList(), false, null,
AccessLevel.PACKAGE, builderType, Collections.<EclipseNode>emptyList(), false,
annotationNode, Collections.<Annotation>emptyList(), null, false);
if (cd != null) injectMethod(builderType, cd);
}
@@ -95,9 +95,9 @@ public class HandleConstructor {
boolean force = ann.force();
List<EclipseNode> fields = force ? findFinalFields(typeNode) : Collections.<EclipseNode>emptyList();
List<Annotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor=", annotationNode);
List<Annotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor", annotationNode);
new HandleConstructor().generateConstructor(typeNode, level, fields, force, staticName, SkipIfConstructorExists.NO, null, onConstructor, annotationNode, null, false);
new HandleConstructor().generateConstructor(typeNode, level, fields, force, staticName, SkipIfConstructorExists.NO, onConstructor, annotationNode, null, false);
}
}
@@ -112,18 +112,15 @@ public class HandleConstructor {
AccessLevel level = ann.access();
if (level == AccessLevel.NONE) return;
String staticName = ann.staticName();
Boolean suppressConstructorProperties = null;
if (annotation.isExplicit("suppressConstructorProperties")) {
@SuppressWarnings("deprecation")
boolean suppress = ann.suppressConstructorProperties();
suppressConstructorProperties = suppress;
annotationNode.addError("This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'.");
}
List<Annotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor=", annotationNode);
List<Annotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor", annotationNode);
new HandleConstructor().generateConstructor(
typeNode, level, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO,
suppressConstructorProperties, onConstructor, annotationNode, null, false);
onConstructor, annotationNode, null, false);
}
}
@@ -174,18 +171,15 @@ public class HandleConstructor {
AccessLevel level = ann.access();
if (level == AccessLevel.NONE) return;
String staticName = ann.staticName();
Boolean suppressConstructorProperties = null;
if (annotation.isExplicit("suppressConstructorProperties")) {
@SuppressWarnings("deprecation")
boolean suppress = ann.suppressConstructorProperties();
suppressConstructorProperties = suppress;
annotationNode.addError("This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'.");
}
List<Annotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor=", annotationNode);
List<Annotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor", annotationNode);
new HandleConstructor().generateConstructor(
typeNode, level, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO,
suppressConstructorProperties, onConstructor, annotationNode, null, false);
onConstructor, annotationNode, null, false);
}
}
@@ -207,14 +201,14 @@ public class HandleConstructor {
EclipseNode typeNode, AccessLevel level, String staticName, SkipIfConstructorExists skipIfConstructorExists,
List<Annotation> onConstructor, EclipseNode sourceNode) {
generateConstructor(typeNode, level, findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, null, onConstructor, sourceNode, null, false);
generateConstructor(typeNode, level, findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, onConstructor, sourceNode, null, false);
}
public void generateAllArgsConstructor(
EclipseNode typeNode, AccessLevel level, String staticName, SkipIfConstructorExists skipIfConstructorExists,
List<Annotation> onConstructor, EclipseNode sourceNode) {
generateConstructor(typeNode, level, findAllFields(typeNode), false, staticName, skipIfConstructorExists, null, onConstructor, sourceNode, null, false);
generateConstructor(typeNode, level, findAllFields(typeNode), false, staticName, skipIfConstructorExists, onConstructor, sourceNode, null, false);
}
public enum SkipIfConstructorExists {
@@ -234,7 +228,7 @@ public class HandleConstructor {
*/
public void generateConstructor(
EclipseNode typeNode, AccessLevel level, List<EclipseNode> fields, boolean allToDefault, String staticName, SkipIfConstructorExists skipIfConstructorExists,
Boolean suppressConstructorProperties, List<Annotation> onConstructor, EclipseNode sourceNode, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
List<Annotation> onConstructor, EclipseNode sourceNode, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
ASTNode source = sourceNode.get();
boolean staticConstrRequired = staticName != null && !staticName.equals("");
@@ -269,7 +263,7 @@ public class HandleConstructor {
ConstructorDeclaration constr = createConstructor(
staticConstrRequired ? AccessLevel.PRIVATE : level, typeNode, fields, allToDefault,
suppressConstructorProperties, sourceNode, onConstructor, builderClassnameAsParameter, callBuilderBasedSuperConstructor);
sourceNode, onConstructor, builderClassnameAsParameter, callBuilderBasedSuperConstructor);
injectMethod(typeNode, constr);
if (staticConstrRequired) {
MethodDeclaration staticConstr = createStaticConstructor(level, staticName, typeNode, allToDefault ? Collections.<EclipseNode>emptyList() : fields, source);
@@ -322,7 +316,7 @@ public class HandleConstructor {
*/
public static ConstructorDeclaration createConstructor(
AccessLevel level, EclipseNode type, Collection<EclipseNode> fields, boolean allToDefault,
Boolean suppressConstructorProperties, EclipseNode sourceNode, List<Annotation> onConstructor,
EclipseNode sourceNode, List<Annotation> onConstructor,
String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
if (builderClassnameAsParameter != null && builderClassnameAsParameter.isEmpty()) {
@@ -340,12 +334,11 @@ public class HandleConstructor {
if (isEnum) level = AccessLevel.PRIVATE;
if (suppressConstructorProperties == null) {
if (fields.isEmpty()) {
suppressConstructorProperties = false;
} else {
suppressConstructorProperties = Boolean.TRUE.equals(type.getAst().readConfiguration(ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES));
}
boolean suppressConstructorProperties;
if (fields.isEmpty()) {
suppressConstructorProperties = false;
} else {
suppressConstructorProperties = Boolean.TRUE.equals(type.getAst().readConfiguration(ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES));
}
ConstructorDeclaration constructor = new ConstructorDeclaration(((CompilationUnitDeclaration) type.top().get()).compilationResult);
@@ -67,6 +67,7 @@ import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
import org.eclipse.jdt.internal.compiler.ast.NameReference;
import org.eclipse.jdt.internal.compiler.ast.NullLiteral;
import org.eclipse.jdt.internal.compiler.ast.OperatorIds;
import org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference;
import org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference;
import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
@@ -128,7 +129,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
List<String> includes = Arrays.asList(ann.of());
EclipseNode typeNode = annotationNode.up();
List<Annotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@EqualsAndHashCode(onParam=", annotationNode);
List<Annotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@EqualsAndHashCode(onParam", annotationNode);
checkForBogusFieldNames(typeNode, annotation);
Boolean callSuper = ann.callSuper();
@@ -458,7 +459,14 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
return assignment;
}
public TypeReference createTypeReference(EclipseNode type, long p) {
/**
* @param type Type to 'copy' into a typeref
* @param p position
* @param addWildcards If false, all generics are cut off. If true, replaces all genericparams with a ?.
* @return
*/
public TypeReference createTypeReference(EclipseNode type, long p, ASTNode source, boolean addWildcards) {
int pS = source.sourceStart; int pE = source.sourceEnd;
List<String> list = new ArrayList<String>();
list.add(type.getName());
EclipseNode tNode = type.up();
@@ -468,21 +476,44 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
}
Collections.reverse(list);
if (list.size() == 1) return new SingleTypeReference(list.get(0).toCharArray(), p);
TypeDeclaration typeDecl = (TypeDeclaration) type.get();
int typeParamCount = typeDecl.typeParameters == null ? 0 : typeDecl.typeParameters.length;
if (typeParamCount == 0) addWildcards = false;
TypeReference[] typeArgs = null;
if (addWildcards) {
typeArgs = new TypeReference[typeParamCount];
for (int i = 0; i < typeParamCount; i++) {
typeArgs[i] = new Wildcard(Wildcard.UNBOUND);
typeArgs[i].sourceStart = pS; typeArgs[i].sourceEnd = pE;
setGeneratedBy(typeArgs[i], source);
}
}
if (list.size() == 1) {
if (addWildcards) {
return new ParameterizedSingleTypeReference(list.get(0).toCharArray(), typeArgs, 0, p);
} else {
return new SingleTypeReference(list.get(0).toCharArray(), p);
}
}
long[] ps = new long[list.size()];
char[][] tokens = new char[list.size()][];
for (int i = 0; i < list.size(); i++) {
ps[i] = p;
tokens[i] = list.get(i).toCharArray();
}
return new QualifiedTypeReference(tokens, ps);
if (addWildcards) {
TypeReference[][] typeArgs2 = new TypeReference[tokens.length][];
typeArgs2[typeArgs2.length - 1] = typeArgs;
return new ParameterizedQualifiedTypeReference(tokens, typeArgs2, 0, ps);
} else {
return new QualifiedTypeReference(tokens, ps);
}
}
public MethodDeclaration createEquals(EclipseNode type, Collection<EclipseNode> fields, boolean callSuper, ASTNode source, FieldAccess fieldAccess, boolean needsCanEqual, List<Annotation> onParam) {
int pS = source.sourceStart; int pE = source.sourceEnd;
long p = (long)pS << 32 | pE;
TypeDeclaration typeDecl = (TypeDeclaration)type.get();
MethodDeclaration method = new MethodDeclaration(
((CompilationUnitDeclaration) type.top().get()).compilationResult);
@@ -528,7 +559,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
SingleNameReference oRef = new SingleNameReference(new char[] { 'o' }, p);
setGeneratedBy(oRef, source);
TypeReference typeReference = createTypeReference(type, p);
TypeReference typeReference = createTypeReference(type, p, source, false);
setGeneratedBy(typeReference, source);
InstanceOfExpression instanceOf = new InstanceOfExpression(oRef, typeReference);
@@ -551,30 +582,15 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
char[] otherName = "other".toCharArray();
/* MyType<?> other = (MyType<?>) o; */ {
/* Outer.Inner.MyType<?> other = (Outer.Inner.MyType<?>) o; */ {
if (!fields.isEmpty() || needsCanEqual) {
LocalDeclaration other = new LocalDeclaration(otherName, pS, pE);
other.modifiers |= ClassFileConstants.AccFinal;
setGeneratedBy(other, source);
char[] typeName = typeDecl.name;
TypeReference targetType;
if (typeDecl.typeParameters == null || typeDecl.typeParameters.length == 0) {
targetType = new SingleTypeReference(typeName, p);
setGeneratedBy(targetType, source);
other.type = new SingleTypeReference(typeName, p);
setGeneratedBy(other.type, source);
} else {
TypeReference[] typeArgs = new TypeReference[typeDecl.typeParameters.length];
for (int i = 0; i < typeArgs.length; i++) {
typeArgs[i] = new Wildcard(Wildcard.UNBOUND);
typeArgs[i].sourceStart = pS; typeArgs[i].sourceEnd = pE;
setGeneratedBy(typeArgs[i], source);
}
targetType = new ParameterizedSingleTypeReference(typeName, typeArgs, 0, p);
setGeneratedBy(targetType, source);
other.type = new ParameterizedSingleTypeReference(typeName, copyTypes(typeArgs, source), 0, p);
setGeneratedBy(other.type, source);
}
TypeReference targetType = createTypeReference(type, p, source, true);
setGeneratedBy(targetType, source);
other.type = createTypeReference(type, p, source, true);
setGeneratedBy(other.type, source);
NameReference oRef = new SingleNameReference(new char[] { 'o' }, p);
setGeneratedBy(oRef, source);
other.initialization = makeCastExpression(oRef, targetType, source);
@@ -772,7 +788,7 @@ public class HandleEqualsAndHashCode extends EclipseAnnotationHandler<EqualsAndH
SingleNameReference otherRef = new SingleNameReference(otherName, p);
setGeneratedBy(otherRef, source);
TypeReference typeReference = createTypeReference(type, p);
TypeReference typeReference = createTypeReference(type, p, source, false);
setGeneratedBy(typeReference, source);
InstanceOfExpression instanceOf = new InstanceOfExpression(otherRef, typeReference);
@@ -148,7 +148,7 @@ public class HandleGetter extends EclipseAnnotationHandler<Getter> {
if (node == null) return;
List<Annotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Getter(onMethod=", annotationNode);
List<Annotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Getter(onMethod", annotationNode);
switch (node.getKind()) {
case FIELD:
@@ -125,8 +125,8 @@ public class HandleSetter extends EclipseAnnotationHandler<Setter> {
AccessLevel level = annotation.getInstance().value();
if (level == AccessLevel.NONE || node == null) return;
List<Annotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod=", annotationNode);
List<Annotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam=", annotationNode);
List<Annotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod", annotationNode);
List<Annotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam", annotationNode);
switch (node.getKind()) {
case FIELD:
@@ -49,6 +49,7 @@ import org.mangosdk.spi.ProviderFor;
import lombok.ConfigurationKeys;
import lombok.core.AnnotationValues;
import lombok.core.HandlerPriority;
import lombok.core.AST.Kind;
import lombok.eclipse.EclipseAnnotationHandler;
import lombok.eclipse.EclipseNode;
@@ -57,6 +58,7 @@ import lombok.experimental.UtilityClass;
/**
* Handles the {@code lombok.experimental.UtilityClass} annotation for eclipse.
*/
@HandlerPriority(-4096) //-2^12; to ensure @FieldDefaults picks up on the 'static' we set here.
@ProviderFor(EclipseAnnotationHandler.class)
public class HandleUtilityClass extends EclipseAnnotationHandler<UtilityClass> {
@Override public void handle(AnnotationValues<UtilityClass> annotation, Annotation ast, EclipseNode annotationNode) {
@@ -127,8 +127,8 @@ public class HandleWither extends EclipseAnnotationHandler<Wither> {
AccessLevel level = annotation.getInstance().value();
if (level == AccessLevel.NONE || node == null) return;
List<Annotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Wither(onMethod=", annotationNode);
List<Annotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Wither(onParam=", annotationNode);
List<Annotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Wither(onMethod", annotationNode);
List<Annotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Wither(onParam", annotationNode);
switch (node.getKind()) {
case FIELD:
+12 -2
View File
@@ -60,12 +60,22 @@ public @interface Wither {
AccessLevel value() default AccessLevel.PUBLIC;
/**
* Any annotations listed here are put on the generated method. The syntax for this feature is: {@code @Setter(onMethod=@__({@AnnotationsGoHere}))}
* Any annotations listed here are put on the generated method.
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @Wither(onMethod=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @Wither(onMethod_={@AnnotationsGohere})} // note the underscore after {@code onMethod}.
*/
AnyAnnotation[] onMethod() default {};
/**
* Any annotations listed here are put on the generated method's parameter. The syntax for this feature is: {@code @Setter(onParam=@__({@AnnotationsGoHere}))}
* Any annotations listed here are put on the generated method's parameter.
* The syntax for this feature depends on JDK version (nothing we can do about that; it's to work around javac bugs).<br />
* up to JDK7:<br />
* {@code @Wither(onParam=@__({@AnnotationsGoHere}))}<br />
* from JDK8:<br />
* {@code @Wither(onParam_={@AnnotationsGohere})} // note the underscore after {@code onParam}.
*/
AnyAnnotation[] onParam() default {};
@@ -0,0 +1,113 @@
/*
* Copyright (C) 2010-2017 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package lombok.javac.apt;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.net.URI;
import java.nio.file.Path;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.NestingKind;
import com.sun.tools.javac.file.BaseFileManager;
class Javac9BaseFileObjectWrapper extends com.sun.tools.javac.file.PathFileObject {
private final LombokFileObject delegate;
public Javac9BaseFileObjectWrapper(BaseFileManager fileManager, Path path, LombokFileObject delegate) {
super(fileManager, path);
this.delegate = delegate;
}
@Override public boolean isNameCompatible(String simpleName, Kind kind) {
return delegate.isNameCompatible(simpleName, kind);
}
@Override public URI toUri() {
return delegate.toUri();
}
@SuppressWarnings("all")
@Override public String getName() {
return delegate.getName();
}
@Override public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
return delegate.getCharContent(ignoreEncodingErrors);
}
@Override public InputStream openInputStream() throws IOException {
return delegate.openInputStream();
}
@Override public Reader openReader(boolean ignoreEncodingErrors) throws IOException {
return delegate.openReader(ignoreEncodingErrors);
}
@Override public Writer openWriter() throws IOException {
return delegate.openWriter();
}
@Override public OutputStream openOutputStream() throws IOException {
return delegate.openOutputStream();
}
@Override public long getLastModified() {
return delegate.getLastModified();
}
@Override public boolean delete() {
return delegate.delete();
}
@Override public Kind getKind() {
return delegate.getKind();
}
@Override public NestingKind getNestingKind() {
return delegate.getNestingKind();
}
@Override public Modifier getAccessLevel() {
return delegate.getAccessLevel();
}
@Override public boolean equals(Object obj) {
if (!(obj instanceof Javac9BaseFileObjectWrapper)) {
return false;
}
return delegate.equals(((Javac9BaseFileObjectWrapper)obj).delegate);
}
@Override public int hashCode() {
return delegate.hashCode();
}
@Override public String toString() {
return delegate.toString();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2011 The Project Lombok Authors.
* Copyright (C) 2010-2017 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -23,19 +23,24 @@
package lombok.javac.apt;
import java.lang.reflect.Method;
import java.net.URI;
import java.nio.file.Paths;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.tools.JavaFileManager;
import javax.tools.JavaFileObject;
import javax.tools.JavaFileObject.Kind;
import com.sun.tools.javac.file.BaseFileManager;
import lombok.core.DiagnosticsReceiver;
//Can't use SimpleJavaFileObject so we copy/paste most of its content here, because javac doesn't follow the interface,
//and casts to its own BaseFileObject type. D'oh!
final class LombokFileObjects {
enum Compiler {
JAVAC6 {
interface Compiler {
Compiler JAVAC6 = new Compiler() {
private Method decoderMethod = null;
private final AtomicBoolean decoderIsSet = new AtomicBoolean();
@@ -46,13 +51,13 @@ final class LombokFileObjects {
@Override public Method getDecoderMethod() {
synchronized (decoderIsSet) {
if (decoderIsSet.get()) return decoderMethod;
decoderMethod = getDecoderMethod("com.sun.tools.javac.util.BaseFileObject");
decoderMethod = LombokFileObjects.getDecoderMethod("com.sun.tools.javac.util.BaseFileObject");
decoderIsSet.set(true);
return decoderMethod;
}
}
},
JAVAC7 {
};
Compiler JAVAC7 = new Compiler() {
private Method decoderMethod = null;
private final AtomicBoolean decoderIsSet = new AtomicBoolean();
@@ -63,28 +68,28 @@ final class LombokFileObjects {
@Override public Method getDecoderMethod() {
synchronized (decoderIsSet) {
if (decoderIsSet.get()) return decoderMethod;
decoderMethod = getDecoderMethod("com.sun.tools.javac.file.BaseFileObject");
decoderMethod = LombokFileObjects.getDecoderMethod("com.sun.tools.javac.file.BaseFileObject");
decoderIsSet.set(true);
return decoderMethod;
}
}
};
static Method getDecoderMethod(String className) {
Method m = null;
try {
m = Class.forName(className).getDeclaredMethod("getDecoder", boolean.class);
m.setAccessible(true);
} catch (NoSuchMethodException e) {
// Intentional fallthrough - getDecoder(boolean) is not always present.
} catch (ClassNotFoundException e) {
// Intentional fallthrough - getDecoder(boolean) is not always present.
}
return m;
}
JavaFileObject wrap(LombokFileObject fileObject);
Method getDecoderMethod();
}
abstract JavaFileObject wrap(LombokFileObject fileObject);
abstract Method getDecoderMethod();
static Method getDecoderMethod(String className) {
Method m = null;
try {
m = Class.forName(className).getDeclaredMethod("getDecoder", boolean.class);
m.setAccessible(true);
} catch (NoSuchMethodException e) {
// Intentional fallthrough - getDecoder(boolean) is not always present.
} catch (ClassNotFoundException e) {
// Intentional fallthrough - getDecoder(boolean) is not always present.
}
return m;
}
private LombokFileObjects() {}
@@ -93,7 +98,16 @@ final class LombokFileObjects {
String jfmClassName = jfm != null ? jfm.getClass().getName() : "null";
if (jfmClassName.equals("com.sun.tools.javac.util.DefaultFileManager")) return Compiler.JAVAC6;
if (jfmClassName.equals("com.sun.tools.javac.util.JavacFileManager")) return Compiler.JAVAC6;
if (jfmClassName.equals("com.sun.tools.javac.file.JavacFileManager")) return Compiler.JAVAC7;
if (jfmClassName.equals("com.sun.tools.javac.file.JavacFileManager")) {
try {
Class<?> superType = Class.forName("com.sun.tools.javac.file.BaseFileManager");
if (superType.isInstance(jfm)) {
return new Java9Compiler(jfm);
}
}
catch (Exception e) {}
return Compiler.JAVAC7;
}
try {
if (Class.forName("com.sun.tools.javac.file.BaseFileObject") == null) throw new NullPointerException();
return Compiler.JAVAC7;
@@ -112,4 +126,24 @@ final class LombokFileObjects {
static JavaFileObject createIntercepting(Compiler compiler, JavaFileObject delegate, String fileName, DiagnosticsReceiver diagnostics) {
return compiler.wrap(new InterceptingJavaFileObject(delegate, fileName, diagnostics, compiler.getDecoderMethod()));
}
static class Java9Compiler implements Compiler {
private final BaseFileManager fileManager;
public Java9Compiler(JavaFileManager jfm) {
fileManager = (BaseFileManager) jfm;
}
@Override public JavaFileObject wrap(LombokFileObject fileObject) {
URI uri = fileObject.toUri();
if (uri.getScheme() == null) {
uri = URI.create("file://" + uri);
}
return new Javac9BaseFileObjectWrapper(fileManager, Paths.get(uri), fileObject);
}
@Override public Method getDecoderMethod() {
throw new UnsupportedOperationException();
}
}
}
@@ -178,7 +178,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
}
boolean callBuilderBasedSuperConstructor = inherit && extendsClause != null;
new HandleConstructor().generateConstructor(tdParent, AccessLevel.PROTECTED, List.<JCAnnotation>nil(), allFields.toList(), false, null, SkipIfConstructorExists.I_AM_BUILDER, null, annotationNode, extendable ? builderClassName : null, callBuilderBasedSuperConstructor);
new HandleConstructor().generateConstructor(tdParent, AccessLevel.PROTECTED, List.<JCAnnotation>nil(), allFields.toList(), false, null, SkipIfConstructorExists.I_AM_BUILDER, annotationNode, extendable ? builderClassName : null, callBuilderBasedSuperConstructor);
returnType = namePlusTypeParamsToTypeReference(tdParent.getTreeMaker(), td.name, td.typarams);
typeParams = td.typarams;
@@ -308,8 +308,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
}
if (pos == -1 || tpOnType.size() <= pos) {
annotationNode.addError("**" + returnType.getClass().toString());
// annotationNode.addError("@Builder(toBuilder=true) requires that each type parameter on the static method is part of the typeargs of the return value. Type parameter " + tp.name + " is not part of the return type.");
annotationNode.addError("@Builder(toBuilder=true) requires that each type parameter on the static method is part of the typeargs of the return value. Type parameter " + tp.name + " is not part of the return type.");
return;
}
typeArgsForToBuilder.add(tpOnType.get(pos).name);
@@ -336,7 +335,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
JavacNode builderType = findInnerClass(tdParent, builderClassName);
if (builderType == null) {
builderType = makeBuilderClass(isStatic, tdParent, builderClassName, typeParams, ast, inherit ? superclassBuilderClassName : null);
builderType = makeBuilderClass(isStatic, annotationNode, tdParent, builderClassName, typeParams, ast, inherit ? superclassBuilderClassName : null);
} else {
JCClassDecl builderTypeDeclaration = (JCClassDecl) builderType.get();
if (isStatic && !builderTypeDeclaration.getModifiers().getFlags().contains(Modifier.STATIC)) {
@@ -358,7 +357,6 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
}
}
}
}
for (BuilderFieldData bfd : builderFields) {
@@ -388,7 +386,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
}
if (constructorExists(builderType) == MemberExistsResult.NOT_EXISTS) {
JCMethodDecl cd = HandleConstructor.createConstructor(AccessLevel.PACKAGE, List.<JCAnnotation>nil(), builderType, List.<JavacNode>nil(), false, null, annotationNode, null, false);
JCMethodDecl cd = HandleConstructor.createConstructor(AccessLevel.PACKAGE, List.<JCAnnotation>nil(), builderType, List.<JavacNode>nil(), false, annotationNode, null, false);
if (cd != null) injectMethod(builderType, cd);
}
@@ -414,7 +412,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
if (addCleaning) injectMethod(builderType, generateCleanMethod(builderFields, builderType, ast));
if (methodExists(builderMethodName, tdParent, -1) == MemberExistsResult.NOT_EXISTS) {
JCMethodDecl md = generateBuilderMethod(isStatic, builderMethodName, builderClassName, tdParent, typeParams);
JCMethodDecl md = generateBuilderMethod(isStatic, builderMethodName, builderClassName, annotationNode, tdParent, typeParams);
recursiveSetGeneratedBy(md, ast, annotationNode.getContext());
if (md != null) injectMethod(tdParent, md);
}
@@ -605,7 +603,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
return maker.MethodDef(maker.Modifiers(Flags.PUBLIC), type.toName(buildName), returnType, List.<JCTypeParameter>nil(), List.<JCVariableDecl>nil(), thrownExceptions, body, null);
}
public JCMethodDecl generateBuilderMethod(boolean isStatic, String builderMethodName, String builderClassName, JavacNode type, List<JCTypeParameter> typeParams) {
public JCMethodDecl generateBuilderMethod(boolean isStatic, String builderMethodName, String builderClassName, JavacNode source, JavacNode type, List<JCTypeParameter> typeParams) {
JavacTreeMaker maker = type.getTreeMaker();
ListBuffer<JCExpression> typeArgs = new ListBuffer<JCExpression>();
@@ -619,7 +617,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
JCBlock body = maker.Block(0, List.<JCStatement>of(statement));
int modifiers = Flags.PUBLIC;
if (isStatic) modifiers |= Flags.STATIC;
return maker.MethodDef(maker.Modifiers(modifiers), type.toName(builderMethodName), namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams), copyTypeParams(maker, typeParams), List.<JCVariableDecl>nil(), List.<JCExpression>nil(), body, null);
return maker.MethodDef(maker.Modifiers(modifiers), type.toName(builderMethodName), namePlusTypeParamsToTypeReference(maker, type.toName(builderClassName), typeParams), copyTypeParams(source, typeParams), List.<JCVariableDecl>nil(), List.<JCExpression>nil(), body, null);
}
public void generateBuilderFields(JavacNode builderType, java.util.List<BuilderFieldData> builderFields, JCTree source) {
@@ -684,7 +682,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
return null;
}
public JavacNode makeBuilderClass(boolean isStatic, JavacNode tdParent, String builderClassName, List<JCTypeParameter> typeParams, JCAnnotation ast, String parentBuilderClassName) {
public JavacNode makeBuilderClass(boolean isStatic, JavacNode source, JavacNode tdParent, String builderClassName, List<JCTypeParameter> typeParams, JCAnnotation ast, String parentBuilderClassName) {
JavacTreeMaker maker = tdParent.getTreeMaker();
int modifiers = Flags.PUBLIC;
if (isStatic) modifiers |= Flags.STATIC;
@@ -693,7 +691,7 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
if (parentBuilderClassName != null) {
extending = maker.Ident(tdParent.toName(parentBuilderClassName));
}
JCClassDecl builder = maker.ClassDef(mods, tdParent.toName(builderClassName), copyTypeParams(maker, typeParams), extending, List.<JCExpression>nil(), List.<JCTree>nil());
JCClassDecl builder = maker.ClassDef(mods, tdParent.toName(builderClassName), copyTypeParams(source, typeParams), extending, List.<JCExpression>nil(), List.<JCTree>nil());
return injectType(tdParent, builder);
}
@@ -75,14 +75,14 @@ public class HandleConstructor {
deleteImportFromCompilationUnit(annotationNode, "lombok.AccessLevel");
JavacNode typeNode = annotationNode.up();
if (!checkLegality(typeNode, annotationNode, NoArgsConstructor.class.getSimpleName())) return;
List<JCAnnotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor=", annotationNode);
List<JCAnnotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@NoArgsConstructor(onConstructor", annotationNode);
NoArgsConstructor ann = annotation.getInstance();
AccessLevel level = ann.access();
if (level == AccessLevel.NONE) return;
String staticName = ann.staticName();
boolean force = ann.force();
List<JavacNode> fields = force ? findFinalFields(typeNode) : List.<JavacNode>nil();
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, fields, force, staticName, SkipIfConstructorExists.NO, null, annotationNode, null, false);
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, fields, force, staticName, SkipIfConstructorExists.NO, annotationNode, null, false);
}
}
@@ -95,19 +95,16 @@ public class HandleConstructor {
deleteImportFromCompilationUnit(annotationNode, "lombok.AccessLevel");
JavacNode typeNode = annotationNode.up();
if (!checkLegality(typeNode, annotationNode, RequiredArgsConstructor.class.getSimpleName())) return;
List<JCAnnotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor=", annotationNode);
List<JCAnnotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@RequiredArgsConstructor(onConstructor", annotationNode);
RequiredArgsConstructor ann = annotation.getInstance();
AccessLevel level = ann.access();
if (level == AccessLevel.NONE) return;
String staticName = ann.staticName();
Boolean suppressConstructorProperties = null;
if (annotation.isExplicit("suppressConstructorProperties")) {
@SuppressWarnings("deprecation")
boolean suppress = ann.suppressConstructorProperties();
suppressConstructorProperties = suppress;
annotationNode.addError("This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'.");
}
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, suppressConstructorProperties, annotationNode, null, false);
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, annotationNode, null, false);
}
}
@@ -145,18 +142,15 @@ public class HandleConstructor {
deleteImportFromCompilationUnit(annotationNode, "lombok.AccessLevel");
JavacNode typeNode = annotationNode.up();
if (!checkLegality(typeNode, annotationNode, AllArgsConstructor.class.getSimpleName())) return;
List<JCAnnotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor=", annotationNode);
List<JCAnnotation> onConstructor = unboxAndRemoveAnnotationParameter(ast, "onConstructor", "@AllArgsConstructor(onConstructor", annotationNode);
AllArgsConstructor ann = annotation.getInstance();
AccessLevel level = ann.access();
if (level == AccessLevel.NONE) return;
String staticName = ann.staticName();
Boolean suppressConstructorProperties = null;
if (annotation.isExplicit("suppressConstructorProperties")) {
@SuppressWarnings("deprecation")
boolean suppress = ann.suppressConstructorProperties();
suppressConstructorProperties = suppress;
annotationNode.addError("This deprecated feature is no longer supported. Remove it; you can create a lombok.config file with 'lombok.anyConstructor.suppressConstructorProperties = true'.");
}
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, suppressConstructorProperties, annotationNode, null, false);
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, annotationNode, null, false);
}
}
@@ -192,7 +186,7 @@ public class HandleConstructor {
}
public void generateRequiredArgsConstructor(JavacNode typeNode, AccessLevel level, String staticName, SkipIfConstructorExists skipIfConstructorExists, JavacNode source) {
generateConstructor(typeNode, level, List.<JCAnnotation>nil(), findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, null, source, null, false);
generateConstructor(typeNode, level, List.<JCAnnotation>nil(), findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, source, null, false);
}
public enum SkipIfConstructorExists {
@@ -200,7 +194,7 @@ public class HandleConstructor {
}
public void generateAllArgsConstructor(JavacNode typeNode, AccessLevel level, String staticName, SkipIfConstructorExists skipIfConstructorExists, JavacNode source) {
generateConstructor(typeNode, level, List.<JCAnnotation>nil(), findAllFields(typeNode), false, staticName, skipIfConstructorExists, null, source, null, false);
generateConstructor(typeNode, level, List.<JCAnnotation>nil(), findAllFields(typeNode), false, staticName, skipIfConstructorExists, source, null, false);
}
/**
@@ -214,7 +208,7 @@ public class HandleConstructor {
* constructor with the builder as argument. Requires
* {@code builderClassAsParameter != null}.
*/
public void generateConstructor(JavacNode typeNode, AccessLevel level, List<JCAnnotation> onConstructor, List<JavacNode> fields, boolean allToDefault, String staticName, SkipIfConstructorExists skipIfConstructorExists, Boolean suppressConstructorProperties, JavacNode source, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
public void generateConstructor(JavacNode typeNode, AccessLevel level, List<JCAnnotation> onConstructor, List<JavacNode> fields, boolean allToDefault, String staticName, SkipIfConstructorExists skipIfConstructorExists, JavacNode source, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
boolean staticConstrRequired = staticName != null && !staticName.equals("");
if (skipIfConstructorExists != SkipIfConstructorExists.NO && constructorExists(typeNode) != MemberExistsResult.NOT_EXISTS) return;
@@ -243,7 +237,7 @@ public class HandleConstructor {
}
}
JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, onConstructor, typeNode, fields, allToDefault, suppressConstructorProperties, source, builderClassnameAsParameter, callBuilderBasedSuperConstructor);
JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, onConstructor, typeNode, fields, allToDefault, source, builderClassnameAsParameter, callBuilderBasedSuperConstructor);
ListBuffer<Type> argTypes = new ListBuffer<Type>();
for (JavacNode fieldNode : fields) {
Type mirror = getMirrorForFieldType(fieldNode);
@@ -288,7 +282,7 @@ public class HandleConstructor {
* constructor with the builder as argument. Requires
* {@code builderClassnameAsParameter != null}.
*/
public static JCMethodDecl createConstructor(AccessLevel level, List<JCAnnotation> onConstructor, JavacNode typeNode, List<JavacNode> fields, boolean allToDefault, Boolean suppressConstructorProperties, JavacNode source, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
public static JCMethodDecl createConstructor(AccessLevel level, List<JCAnnotation> onConstructor, JavacNode typeNode, List<JavacNode> fields, boolean allToDefault, JavacNode source, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
if (builderClassnameAsParameter != null && builderClassnameAsParameter.isEmpty()) {
builderClassnameAsParameter = null;
}
@@ -301,12 +295,12 @@ public class HandleConstructor {
boolean isEnum = (((JCClassDecl) typeNode.get()).mods.flags & Flags.ENUM) != 0;
if (isEnum) level = AccessLevel.PRIVATE;
if (suppressConstructorProperties == null) {
if (fields.isEmpty()) {
suppressConstructorProperties = false;
} else {
suppressConstructorProperties = Boolean.TRUE.equals(typeNode.getAst().readConfiguration(ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES));
}
boolean suppressConstructorProperties;
if (fields.isEmpty()) {
suppressConstructorProperties = false;
} else {
suppressConstructorProperties = Boolean.TRUE.equals(typeNode.getAst().readConfiguration(ConfigurationKeys.ANY_CONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES));
}
ListBuffer<JCStatement> nullChecks = new ListBuffer<JCStatement>();
@@ -95,7 +95,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
List<String> excludes = List.from(ann.exclude());
List<String> includes = List.from(ann.of());
JavacNode typeNode = annotationNode.up();
List<JCAnnotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@EqualsAndHashCode(onParam=", annotationNode);
List<JCAnnotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@EqualsAndHashCode(onParam", annotationNode);
checkForBogusFieldNames(typeNode, annotation);
Boolean callSuper = ann.callSuper();
@@ -363,7 +363,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
return maker.TypeCast(maker.TypeIdent(CTC_INT), maker.Parens(xorBits));
}
public JCExpression createTypeReference(JavacNode type) {
public JCExpression createTypeReference(JavacNode type, boolean addWildcards) {
java.util.List<String> list = new ArrayList<String>();
list.add(type.getName());
JavacNode tNode = type.up();
@@ -372,20 +372,28 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
tNode = tNode.up();
}
Collections.reverse(list);
JCClassDecl typeDecl = (JCClassDecl) type.get();
JavacTreeMaker maker = type.getTreeMaker();
JCExpression chain = maker.Ident(type.toName(list.get(0)));
for (int i = 1; i < list.size(); i++) {
chain = maker.Select(chain, type.toName(list.get(i)));
}
return chain;
if (!addWildcards || typeDecl.typarams.length() == 0) return chain;
ListBuffer<JCExpression> wildcards = new ListBuffer<JCExpression>();
for (int i = 0 ; i < typeDecl.typarams.length() ; i++) {
wildcards.append(maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null));
}
return maker.TypeApply(chain, wildcards.toList());
}
public JCMethodDecl createEquals(JavacNode typeNode, List<JavacNode> fields, boolean callSuper, FieldAccess fieldAccess, boolean needsCanEqual, JCTree source, List<JCAnnotation> onParam) {
JavacTreeMaker maker = typeNode.getTreeMaker();
JCClassDecl type = (JCClassDecl) typeNode.get();
Name oName = typeNode.toName("o");
Name otherName = typeNode.toName("other");
@@ -408,27 +416,13 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
/* if (!(o instanceof Outer.Inner.MyType)) return false; */ {
JCUnary notInstanceOf = maker.Unary(CTC_NOT, maker.Parens(maker.TypeTest(maker.Ident(oName), createTypeReference(typeNode))));
JCUnary notInstanceOf = maker.Unary(CTC_NOT, maker.Parens(maker.TypeTest(maker.Ident(oName), createTypeReference(typeNode, false))));
statements.append(maker.If(notInstanceOf, returnBool(maker, false), null));
}
/* MyType<?> other = (MyType<?>) o; */ {
/* Outer.Inner.MyType<?> other = (Outer.Inner.MyType<?>) o; */ {
if (!fields.isEmpty() || needsCanEqual) {
final JCExpression selfType1, selfType2;
ListBuffer<JCExpression> wildcards1 = new ListBuffer<JCExpression>();
ListBuffer<JCExpression> wildcards2 = new ListBuffer<JCExpression>();
for (int i = 0 ; i < type.typarams.length() ; i++) {
wildcards1.append(maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null));
wildcards2.append(maker.Wildcard(maker.TypeBoundKind(BoundKind.UNBOUND), null));
}
if (type.typarams.isEmpty()) {
selfType1 = maker.Ident(type.name);
selfType2 = maker.Ident(type.name);
} else {
selfType1 = maker.TypeApply(maker.Ident(type.name), wildcards1.toList());
selfType2 = maker.TypeApply(maker.Ident(type.name), wildcards2.toList());
}
final JCExpression selfType1 = createTypeReference(typeNode, true), selfType2 = createTypeReference(typeNode, true);
statements.append(
maker.VarDef(maker.Modifiers(finalFlag), otherName, selfType1, maker.TypeCast(selfType2, maker.Ident(oName))));
@@ -533,7 +527,7 @@ public class HandleEqualsAndHashCode extends JavacAnnotationHandler<EqualsAndHas
List<JCVariableDecl> params = List.of(maker.VarDef(maker.Modifiers(flags, onParam), otherName, objectType, null));
JCBlock body = maker.Block(0, List.<JCStatement>of(
maker.Return(maker.TypeTest(maker.Ident(otherName), createTypeReference(typeNode)))));
maker.Return(maker.TypeTest(maker.Ident(otherName), createTypeReference(typeNode, false)))));
return recursiveSetGeneratedBy(maker.MethodDef(mods, canEqualName, returnType, List.<JCTypeParameter>nil(), params, List.<JCExpression>nil(), body, null), source, typeNode.getContext());
}
@@ -147,7 +147,7 @@ public class HandleGetter extends JavacAnnotationHandler<Getter> {
if (node == null) return;
List<JCAnnotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Getter(onMethod=", annotationNode);
List<JCAnnotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Getter(onMethod", annotationNode);
switch (node.getKind()) {
case FIELD:
@@ -129,8 +129,8 @@ public class HandleSetter extends JavacAnnotationHandler<Setter> {
if (level == AccessLevel.NONE || node == null) return;
List<JCAnnotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod=", annotationNode);
List<JCAnnotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam=", annotationNode);
List<JCAnnotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod", annotationNode);
List<JCAnnotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam", annotationNode);
switch (node.getKind()) {
case FIELD:
@@ -44,6 +44,7 @@ import com.sun.tools.javac.util.Name;
import lombok.ConfigurationKeys;
import lombok.core.AST.Kind;
import lombok.core.AnnotationValues;
import lombok.core.HandlerPriority;
import lombok.experimental.UtilityClass;
import lombok.javac.Javac;
import lombok.javac.JavacAnnotationHandler;
@@ -53,6 +54,7 @@ import lombok.javac.JavacTreeMaker;
/**
* Handles the {@code @UtilityClass} annotation for javac.
*/
@HandlerPriority(-4096) //-2^12; to ensure @FieldDefaults picks up on the 'static' we set here.
@ProviderFor(JavacAnnotationHandler.class)
public class HandleUtilityClass extends JavacAnnotationHandler<UtilityClass> {
@Override public void handle(AnnotationValues<UtilityClass> annotation, JCAnnotation ast, JavacNode annotationNode) {
@@ -131,8 +131,8 @@ public class HandleWither extends JavacAnnotationHandler<Wither> {
if (level == AccessLevel.NONE || node == null) return;
List<JCAnnotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Wither(onMethod=", annotationNode);
List<JCAnnotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Wither(onParam=", annotationNode);
List<JCAnnotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Wither(onMethod", annotationNode);
List<JCAnnotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Wither(onParam", annotationNode);
switch (node.getKind()) {
case FIELD:
@@ -92,6 +92,7 @@ import com.sun.tools.javac.tree.JCTree.JCTypeParameter;
import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
import com.sun.tools.javac.tree.JCTree.JCWildcard;
import com.sun.tools.javac.tree.JCTree.TypeBoundKind;
import com.sun.tools.javac.tree.TreeMaker;
import com.sun.tools.javac.tree.TreeScanner;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
@@ -894,16 +895,20 @@ public class JavacHandlerUtil {
static class ClassSymbolMembersField {
private static final Field membersField;
private static final Method removeMethod;
private static final Method enterMethod;
static {
Field f = null;
Method m = null;
Method r = null;
Method e = null;
try {
f = ClassSymbol.class.getField("members_field");
m = f.getType().getMethod("remove", Symbol.class);
} catch (Exception e) {}
r = f.getType().getMethod("remove", Symbol.class);
e = f.getType().getMethod("enter", Symbol.class);
} catch (Exception ex) {}
membersField = f;
removeMethod = m;
removeMethod = r;
enterMethod = e;
}
static void remove(ClassSymbol from, Symbol toRemove) {
@@ -914,6 +919,15 @@ public class JavacHandlerUtil {
removeMethod.invoke(scope, toRemove);
} catch (Exception e) {}
}
static void enter(ClassSymbol from, Symbol toEnter) {
if (from == null) return;
try {
Scope scope = (Scope) membersField.get(from);
if (scope == null) return;
enterMethod.invoke(scope, toEnter);
} catch (Exception e) {}
}
}
public static void injectMethod(JavacNode typeNode, JCMethodDecl method) {
@@ -959,7 +973,7 @@ public class JavacHandlerUtil {
if (typeMirror == null || paramTypes == null || returnType == null) return;
ClassSymbol cs = (ClassSymbol) typeMirror;
MethodSymbol methodSymbol = new MethodSymbol(access, methodName, new MethodType(paramTypes, returnType, List.<Type>nil(), Symtab.instance(context).methodClass), cs);
cs.members_field.enter(methodSymbol);
ClassSymbolMembersField.enter(cs, methodSymbol);
}
/**
@@ -1025,10 +1039,10 @@ public class JavacHandlerUtil {
public static void addGenerated(JCModifiers mods, JavacNode node, int pos, JCTree source, Context context) {
if (!LombokOptionsFactory.getDelombokOptions(context).getFormatPreferences().generateGenerated()) return;
if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_JAVAX_GENERATED_ANNOTATIONS)) {
if (HandlerUtil.shouldAddGenerated(node)) {
addAnnotation(mods, node, pos, source, context, "javax.annotation.Generated", node.getTreeMaker().Literal("lombok"));
}
if (HandlerUtil.shouldAddGenerated(node, ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS)) {
if (Boolean.TRUE.equals(node.getAst().readConfiguration(ConfigurationKeys.ADD_LOMBOK_GENERATED_ANNOTATIONS))) {
addAnnotation(mods, node, pos, source, context, "lombok.Generated", null);
}
}
@@ -1226,19 +1240,9 @@ public class JavacHandlerUtil {
ListBuffer<JCExpression> params = new ListBuffer<JCExpression>();
ListBuffer<JCAnnotation> result = new ListBuffer<JCAnnotation>();
try {
for (JCExpression arg : ast.args) {
String argName = "value";
if (arg instanceof JCAssign) {
JCAssign as = (JCAssign) arg;
argName = as.lhs.toString();
}
if (!argName.equals(parameterName)) continue;
}
} catch (Exception ignore) {}
outer:
for (JCExpression param : ast.args) {
boolean allowRaw;
String nameOfParam = "value";
JCExpression valueOfParam = null;
if (param instanceof JCAssign) {
@@ -1250,6 +1254,15 @@ public class JavacHandlerUtil {
valueOfParam = assign.rhs;
}
/* strip trailing underscores */ {
int lastIdx;
for (lastIdx = nameOfParam.length() ; lastIdx > 0; lastIdx--) {
if (nameOfParam.charAt(lastIdx - 1) != '_') break;
}
allowRaw = lastIdx < nameOfParam.length();
nameOfParam = nameOfParam.substring(0, lastIdx);
}
if (!parameterName.equals(nameOfParam)) {
params.append(param);
continue outer;
@@ -1262,52 +1275,84 @@ public class JavacHandlerUtil {
String dummyAnnotationName = ((JCAnnotation) valueOfParam).annotationType.toString();
dummyAnnotationName = dummyAnnotationName.replace("_", "").replace("$", "").replace("x", "").replace("X", "");
if (dummyAnnotationName.length() > 0) {
annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
continue outer;
}
for (JCExpression expr : ((JCAnnotation) valueOfParam).args) {
if (expr instanceof JCAssign && ((JCAssign) expr).lhs instanceof JCIdent) {
JCIdent id = (JCIdent) ((JCAssign) expr).lhs;
if ("value".equals(id.name.toString())) {
expr = ((JCAssign) expr).rhs;
if (allowRaw) {
result.append((JCAnnotation) valueOfParam);
} else {
addError(errorName, annotationNode);
continue outer;
}
} else {
for (JCExpression expr : ((JCAnnotation) valueOfParam).args) {
if (expr instanceof JCAssign && ((JCAssign) expr).lhs instanceof JCIdent) {
JCIdent id = (JCIdent) ((JCAssign) expr).lhs;
if ("value".equals(id.name.toString())) {
expr = ((JCAssign) expr).rhs;
} else {
addError(errorName, annotationNode);
}
}
if (expr instanceof JCAnnotation) {
result.append((JCAnnotation) expr);
} else if (expr instanceof JCNewArray) {
for (JCExpression expr2 : ((JCNewArray) expr).elems) {
if (expr2 instanceof JCAnnotation) {
result.append((JCAnnotation) expr2);
} else {
addError(errorName, annotationNode);
continue outer;
}
}
} else {
annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
addError(errorName, annotationNode);
continue outer;
}
}
if (expr instanceof JCAnnotation) {
result.append((JCAnnotation) expr);
} else if (expr instanceof JCNewArray) {
for (JCExpression expr2 : ((JCNewArray) expr).elems) {
if (expr2 instanceof JCAnnotation) {
result.append((JCAnnotation) expr2);
} else {
annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
continue outer;
}
}
} else {
annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
continue outer;
}
} else if (valueOfParam instanceof JCNewArray) {
JCNewArray arr = (JCNewArray) valueOfParam;
if (arr.elems.isEmpty()) {
// Just remove it, this is always fine.
} else if (allowRaw) {
for (JCExpression jce : arr.elems) {
if (jce instanceof JCAnnotation) result.append((JCAnnotation) jce);
else addError(errorName, annotationNode);
}
} else {
addError(errorName, annotationNode);
}
} else {
if (valueOfParam instanceof JCNewArray && ((JCNewArray) valueOfParam).elems.isEmpty()) {
// Then we just remove it and move on (it's onMethod={} for example).
} else {
annotationNode.addError("The correct format is " + errorName + "@__({@SomeAnnotation, @SomeOtherAnnotation}))");
}
addError(errorName, annotationNode);
}
}
ast.args = params.toList();
return result.toList();
}
public static List<JCTypeParameter> copyTypeParams(JavacTreeMaker maker, List<JCTypeParameter> params) {
private static void addError(String errorName, JavacNode node) {
if (node.getLatestJavaSpecSupported() < 8) {
node.addError("The correct format up to JDK7 is " + errorName + "=@__({@SomeAnnotation, @SomeOtherAnnotation}))");
} else {
node.addError("The correct format for JDK8+ is " + errorName + "_={@SomeAnnotation, @SomeOtherAnnotation})");
}
}
public static List<JCTypeParameter> copyTypeParams(JavacNode source, List<JCTypeParameter> params) {
if (params == null || params.isEmpty()) return params;
ListBuffer<JCTypeParameter> out = new ListBuffer<JCTypeParameter>();
for (JCTypeParameter tp : params) out.append(maker.TypeParameter(tp.name, tp.bounds));
JavacTreeMaker maker = source.getTreeMaker();
Context context = source.getContext();
for (JCTypeParameter tp : params) {
List<JCExpression> bounds = tp.bounds;
if (bounds != null && !bounds.isEmpty()) {
ListBuffer<JCExpression> boundsCopy = new ListBuffer<JCExpression>();
for (JCExpression expr : tp.bounds) {
boundsCopy.append(cloneType(maker, expr, source.get(), context));
}
bounds = boundsCopy.toList();
}
out.append(maker.TypeParameter(tp.name, bounds));
}
return out.toList();
}
@@ -30,8 +30,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.eclipse.jdt.internal.corext.refactoring.SearchResultGroup;
import lombok.core.AgentLauncher;
import lombok.patcher.Filter;
import lombok.patcher.Hook;
+147 -37
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2016 The Project Lombok Authors.
* Copyright (C) 2009-2017 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -39,6 +39,8 @@ import java.awt.event.ActionListener;
import java.awt.font.TextAttribute;
import java.io.File;
import java.io.FilenameFilter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
@@ -62,9 +64,12 @@ import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.Scrollable;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.filechooser.FileFilter;
import javax.swing.text.html.HTMLDocument;
import lombok.core.Version;
import lombok.installer.OsUtils.OS;
@@ -75,6 +80,7 @@ import lombok.installer.OsUtils.OS;
* Also offers info on what this installer does in case people want to instrument their IDE manually.
*/
public class InstallerGUI {
private static final int INSTALLER_WINDOW_WIDTH = 662;
static final AtomicReference<Integer> exitMarker = new AtomicReference<Integer>();
private JFrame appWindow;
@@ -85,6 +91,7 @@ public class InstallerGUI {
private Component ideArea;
private Component uninstallArea;
private Component howIWorkArea;
private Component successArea;
private Box uninstallBox;
private JHyperLink uninstallButton;
@@ -113,6 +120,8 @@ public class InstallerGUI {
uninstallArea.setVisible(false);
howIWorkArea = buildHowIWorkArea();
howIWorkArea.setVisible(false);
successArea = buildSuccessArea();
successArea.setVisible(false);
buildChrome(appWindow.getContentPane());
appWindow.pack();
} catch (Throwable t) {
@@ -153,6 +162,7 @@ public class InstallerGUI {
howIWorkArea.setVisible(false);
javacArea.setVisible(true);
ideArea.setVisible(true);
successArea.setVisible(false);
appWindow.pack();
}
});
@@ -160,9 +170,84 @@ public class InstallerGUI {
constraints.gridy = 2;
container.add(buttonBar, constraints);
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415));
return container;
}
private void showSuccess(String installSpecific) {
successExplanation.setText(SUCCESS_EXPLANATION.replace("%%%", installSpecific));
howIWorkArea.setVisible(false);
javacArea.setVisible(false);
ideArea.setVisible(false);
successArea.setVisible(true);
appWindow.pack();
}
private JLabel successExplanation;
private Component buildSuccessArea() {
JPanel container = new JPanel();
container.setLayout(new GridBagLayout());
GridBagConstraints constraints = new GridBagConstraints();
constraints.anchor = GridBagConstraints.WEST;
JLabel title;
container.add(title = new JLabel(SUCCESS_TITLE), constraints);
title.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 20));
constraints.gridy = 1;
constraints.insets = new Insets(8, 0, 0, 16);
container.add(successExplanation = new JLabel(SUCCESS_EXPLANATION), constraints);
successExplanation.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 175));
successExplanation.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 175));
constraints.gridy++;
constraints.fill = GridBagConstraints.BOTH;
JTextPane notes = new JTextPane();
notes.setContentType("text/html");
notes.setText(readChangeLog());
notes.setEditable(false);
notes.setOpaque(false);
notes.setBorder(null);
notes.setSelectionStart(0);
notes.setSelectionEnd(0);
Font font = UIManager.getFont("Label.font");
String bodyRule = "body { font-family: " + font.getFamily() + "; font-size: " + font.getSize() + "pt; }";
((HTMLDocument) notes.getDocument()).getStyleSheet().addRule(bodyRule);
JScrollPane scroller = new JScrollPane(notes);
container.add(scroller, constraints);
scroller.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 200));
scroller.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH - 82, 200));
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415));
container.setMinimumSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415));
return container;
}
private String readChangeLog() {
InputStream in = Installer.class.getResourceAsStream("/latestchanges.html");
try {
char[] buff = new char[8192];
StringBuilder contents = new StringBuilder();
InputStreamReader reader = new InputStreamReader(in, "UTF-8");
while (true) {
int read = reader.read(buff);
if (read == -1) break;
contents.append(buff, 0, read);
}
return "<html>" + contents + "</html>";
} catch (Exception e) {
return "No Changelog available";
}
finally {
try {
in.close();
} catch (Exception ignore){ /**/}
}
}
private Component buildUninstallArea() {
JPanel container = new JPanel();
@@ -210,6 +295,7 @@ public class InstallerGUI {
constraints.gridy = 4;
container.add(buttonBar, constraints);
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 415));
return container;
}
@@ -232,6 +318,7 @@ public class InstallerGUI {
constraints.gridy = 2;
container.add(example, constraints);
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 105));
return container;
}
@@ -289,11 +376,11 @@ public class InstallerGUI {
if (locations.size() + problems.size() == 0) {
JOptionPane.showMessageDialog(appWindow,
"I can't find any IDEs on your computer.\n" +
"If you have IDEs installed on this computer, please use the " +
"'Specify Location...' button to manually point out the \n" +
"location of your IDE installation to me. Thanks!",
"Can't find IDE", JOptionPane.INFORMATION_MESSAGE);
"I can't find any IDEs on your computer.\n" +
"If you have IDEs installed on this computer, please use the " +
"'Specify Location...' button to manually point out the \n" +
"location of your IDE installation to me. Thanks!",
"Can't find IDE", JOptionPane.INFORMATION_MESSAGE);
}
}
});
@@ -419,7 +506,7 @@ public class InstallerGUI {
uninstallPlaceholder.setVisible(false);
container.add(uninstallPlaceholder, constraints);
container.setPreferredSize(new Dimension(INSTALLER_WINDOW_WIDTH, 296));
return container;
}
@@ -427,6 +514,7 @@ public class InstallerGUI {
javacArea.setVisible(false);
ideArea.setVisible(false);
howIWorkArea.setVisible(true);
successArea.setVisible(false);
appWindow.pack();
}
@@ -453,6 +541,7 @@ public class InstallerGUI {
spinner.setOpaque(true);
spinner.setLayout(new FlowLayout());
spinner.add(new JLabel(new ImageIcon(Installer.class.getResource("loading.gif"))));
final Container appWindowContent = appWindow.getContentPane();
appWindow.setContentPane(spinner);
final AtomicInteger successes = new AtomicInteger();
@@ -500,20 +589,13 @@ public class InstallerGUI {
try {
SwingUtilities.invokeAndWait(new Runnable() {
@Override public void run() {
appWindow.setContentPane(appWindowContent);
appWindow.pack();
StringBuilder installSpecific = new StringBuilder();
for (String installSpecificMessage : installSpecificMessages) {
installSpecific.append("<br>").append(installSpecificMessage);
}
JOptionPane.showMessageDialog(appWindow,
"<html>Lombok has been installed on the selected IDE installations.<br>" +
"Don't forget to add <code>lombok.jar</code> to your projects, and restart your IDE!" + installSpecific.toString() + "</html>",
"Install successful",
JOptionPane.INFORMATION_MESSAGE);
appWindow.setVisible(false);
synchronized (exitMarker) {
exitMarker.set(0);
exitMarker.notifyAll();
}
showSuccess(installSpecific.toString());
}
});
} catch (Exception e) {
@@ -711,6 +793,8 @@ public class InstallerGUI {
appWindowContainer.add(howIWorkArea, constraints);
appWindowContainer.add(successArea, constraints);
constraints.gridy++;
constraints.gridwidth = 2;
constraints.gridx = 0;
@@ -719,9 +803,33 @@ public class InstallerGUI {
constraints.ipadx = 0;
constraints.ipady = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.anchor = GridBagConstraints.SOUTHEAST;
constraints.anchor = GridBagConstraints.SOUTHWEST;
constraints.insets = new Insets(0, 16, 8, 8);
appWindow.add(buildButtonBar(), constraints);
}
private Box buildButtonBar() {
Box buttonBar = Box.createHorizontalBox();
JHyperLink aboutLink = new JHyperLink(Installer.ABOUT_LOMBOK_URL.toString());
aboutLink.addActionListener(openBrowser(aboutLink, Installer.ABOUT_LOMBOK_URL));
buttonBar.add(aboutLink);
buttonBar.add(Box.createRigidArea(new Dimension(16, 1)));
JLabel versionLabel = new JLabel();
versionLabel.setText("v" + Version.getVersion());
buttonBar.add(versionLabel);
buttonBar.add(Box.createRigidArea(new Dimension(16, 1)));
JHyperLink changelogLink = new JHyperLink("View full changelog");
changelogLink.addActionListener(openBrowser(changelogLink, Installer.ABOUT_LOMBOK_URL.resolve("/changelog.html")));
buttonBar.add(changelogLink);
buttonBar.add(Box.createHorizontalGlue());
JButton quitButton = new JButton("Quit Installer");
quitButton.addActionListener(new ActionListener() {
@Override public void actionPerformed(ActionEvent e) {
@@ -729,14 +837,18 @@ public class InstallerGUI {
System.exit(0);
}
});
final JHyperLink hyperlink = new JHyperLink(Installer.ABOUT_LOMBOK_URL.toString());
hyperlink.addActionListener(new ActionListener() {
buttonBar.add(quitButton);
return buttonBar;
}
private ActionListener openBrowser(final JHyperLink hyperlink, final URI location) {
return new ActionListener() {
@Override public void actionPerformed(ActionEvent event) {
hyperlink.setForeground(new Color(85, 145, 90));
try {
//java.awt.Desktop doesn't exist in 1.5.
Object desktop = Class.forName("java.awt.Desktop").getMethod("getDesktop").invoke(null);
Class.forName("java.awt.Desktop").getMethod("browse", URI.class).invoke(desktop, Installer.ABOUT_LOMBOK_URL);
Class.forName("java.awt.Desktop").getMethod("browse", URI.class).invoke(desktop, location);
} catch (Exception e) {
Runtime rt = Runtime.getRuntime();
try {
@@ -746,34 +858,27 @@ public class InstallerGUI {
cmd[0] = "cmd.exe";
cmd[1] = "/C";
cmd[2] = "start";
cmd[3] = Installer.ABOUT_LOMBOK_URL.toString();
cmd[3] = location.toString();
rt.exec(cmd);
break;
case MAC_OS_X:
rt.exec("open " + Installer.ABOUT_LOMBOK_URL.toString());
rt.exec("open " + location.toString());
break;
default:
case UNIX:
rt.exec("firefox " + Installer.ABOUT_LOMBOK_URL.toString());
rt.exec("firefox " + location.toString());
break;
}
} catch (Exception e2) {
JOptionPane.showMessageDialog(appWindow,
"Well, this is embarrassing. I don't know how to open a webbrowser.\n" +
"I guess you'll have to open it. Browse to:\n" + Installer.ABOUT_LOMBOK_URL +
"I guess you'll have to open it. Browse to:\n" + location +
" for more information about Lombok.",
"I'm embarrassed", JOptionPane.INFORMATION_MESSAGE);
}
}
}
});
buttonBar.add(hyperlink);
buttonBar.add(Box.createRigidArea(new Dimension(16, 1)));
buttonBar.add(new JLabel("<html><font size=\"-1\">v" + Version.getVersion() + "</font></html>"));
buttonBar.add(Box.createHorizontalGlue());
buttonBar.add(quitButton);
appWindow.add(buttonBar, constraints);
};
}
/**
@@ -791,7 +896,7 @@ public class InstallerGUI {
}
private static final String IDE_TITLE =
"<html><font size=\"+1\"><b><i>IDEs</i></b></font></html>";
"<html><font size=\"+1\"><b><i>IDEs </i></b></font></html>";
private static final String IDE_EXPLANATION =
"<html>Lombok can update your Eclipse or eclipse-based IDE to fully support all Lombok features.<br>" +
@@ -801,7 +906,7 @@ public class InstallerGUI {
"Scanning your drives for IDE installations...";
private static final String JAVAC_TITLE =
"<html><font size=\"+1\"><b><i>Javac</i></b></font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (and tools that invoke javac such as <i>ant</i> and <i>maven</i>)</html>";
"<html><font size=\"+1\"><b><i>Javac </i></b></font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (and tools that invoke javac such as <i>ant</i> and <i>maven</i>)</html>";
private static final String JAVAC_EXPLANATION =
"<html>Lombok works 'out of the box' with javac.<br>Just make sure the lombok.jar is in your classpath when you compile.";
@@ -810,13 +915,13 @@ public class InstallerGUI {
"<html>Example: <code>javac -cp lombok.jar MyCode.java</code></html>";
private static final String UNINSTALL_TITLE =
"<html><font size=\"+1\"><b><i>Uninstall</i></b></font></html>";
"<html><font size=\"+1\"><b><i>Uninstall </i></b></font></html>";
private static final String UNINSTALL_EXPLANATION =
"<html>Uninstall Lombok from the following IDE Installations?</html>";
private static final String HOW_I_WORK_TITLE =
"<html><font size=\"+1\"><b><i>What this installer does</i></b></font></html>";
"<html><font size=\"+1\"><b><i>What this installer does </i></b></font></html>";
private static final String HOW_I_WORK_EXPLANATION =
"<html><h2>Eclipse</h2><ol>" +
@@ -826,6 +931,11 @@ public class InstallerGUI {
"On Mac OS X, eclipse.ini is hidden in<br>" +
"<code>Eclipse.app/Contents/MacOS</code> so that's where I place the jar files.</html>";
private static final String SUCCESS_TITLE = "<html><font size=\"+1\"><b><i>Install successful </i></b></font></html>";
private static final String SUCCESS_EXPLANATION = "<html>Lombok has been installed on the selected IDE installations.<br>" +
"Don't forget to:<ul><li> add <code>lombok.jar</code> to your projects,<li><b>exit and start</b> your IDE,<li><b>rebuild</b> all projects!</ul>%%%</html>";
private static class JHyperLink extends JButton {
private static final long serialVersionUID = 1L;
@@ -288,10 +288,10 @@ public class EclipseProductLocationProvider implements IdeLocationProvider {
abstract String findEclipseOnPlatform(File dir);
void recurseDirectory(List<IdeLocation> locations, List<CorruptedIdeLocationException> problems, File dir) {
recurseDirectory0(locations, problems, dir, 0);
recurseDirectory0(locations, problems, dir, 0, false);
}
private void recurseDirectory0(List<IdeLocation> locations, List<CorruptedIdeLocationException> problems, File f, int loopCounter) {
private void recurseDirectory0(List<IdeLocation> locations, List<CorruptedIdeLocationException> problems, File f, int loopCounter, boolean nameFound) {
//Various try/catch/ignore statements are in this for loop. Weird conditions on the disk can cause exceptions,
//such as an unformatted drive causing a NullPointerException on listFiles. Best action is almost invariably to just
//continue onwards.
@@ -301,9 +301,9 @@ public class EclipseProductLocationProvider implements IdeLocationProvider {
for (File dir : listFiles) {
if (!dir.isDirectory()) continue;
try {
if (dir.getName().toLowerCase().contains(descriptor.getDirectoryName())) {
if (nameFound || dir.getName().toLowerCase().contains(descriptor.getDirectoryName())) {
findEclipse(locations, problems, dir);
if (loopCounter < 50) recurseDirectory0(locations, problems, dir, loopCounter + 1);
if (loopCounter < 50) recurseDirectory0(locations, problems, dir, loopCounter + 1, true);
}
} catch (Exception ignore) {}
}
@@ -118,12 +118,16 @@ class ShadowClassLoader extends ClassLoader {
SELF_BASE = selfBase;
SELF_BASE_LENGTH = selfBase.length();
} else {
String sclClassUrl = ShadowClassLoader.class.getResource("ShadowClassLoader.class").toString();
if (!sclClassUrl.endsWith(SELF_NAME)) throw new InternalError("ShadowLoader can't find itself.");
SELF_BASE_LENGTH = sclClassUrl.length() - SELF_NAME.length();
URL sclClassUrl = ShadowClassLoader.class.getResource("ShadowClassLoader.class");
String sclClassStr = sclClassUrl == null ? null : sclClassUrl.toString();
if (sclClassStr == null || !sclClassStr.endsWith(SELF_NAME)) {
ClassLoader cl = ShadowClassLoader.class.getClassLoader();
throw new RuntimeException("ShadowLoader can't find itself. SCL loader type: " + (cl == null ? "*NULL*" : cl.getClass().toString()));
}
SELF_BASE_LENGTH = sclClassStr.length() - SELF_NAME.length();
String decoded;
try {
decoded = URLDecoder.decode(sclClassUrl.substring(0, SELF_BASE_LENGTH), "UTF-8");
decoded = URLDecoder.decode(sclClassStr.substring(0, SELF_BASE_LENGTH), "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new InternalError("UTF-8 not available");
}
@@ -451,7 +455,12 @@ class ShadowClassLoader extends ClassLoader {
Class<?> alreadyDefined = highlanderMap.get(name);
if (alreadyDefined != null) return alreadyDefined;
}
throw e;
try {
c = this.findLoadedClass(name);
} catch (LinkageError e2) {
throw e;
}
if (c == null) throw e;
}
if (highlanders.contains(name)) {
@@ -0,0 +1,8 @@
/*
* These are stub versions of various bits of javac-internal API (for various different versions of javac). Lombok is compiled against these.
*/
package com.sun.tools.javac.file;
import javax.tools.JavaFileManager;
public abstract class BaseFileManager implements JavaFileManager{}
@@ -0,0 +1,12 @@
/*
* These are stub versions of various bits of javac-internal API (for various different versions of javac). Lombok is compiled against these.
*/
package com.sun.tools.javac.file;
import java.nio.file.Path;
import javax.tools.JavaFileObject;
public abstract class PathFileObject implements JavaFileObject {
protected PathFileObject(BaseFileManager fileManager, Path path) {}
}
+4 -19
View File
@@ -55,15 +55,15 @@ public abstract class AbstractRunTests {
this.dumpActualFilesHere = findPlaceToDumpActualFiles();
}
public final FileTester createTester(final DirectoryRunner.TestParams params, final File file) throws IOException {
public final FileTester createTester(final DirectoryRunner.TestParams params, final File file, String platform, int version) throws IOException {
ConfigurationKeysLoader.LoaderLoader.loadAllConfigurationKeys();
AssertionError directiveFailure = null;
LombokTestSource sourceDirectives = null;
try {
sourceDirectives = LombokTestSource.readDirectives(file);
if (sourceDirectives.isIgnore()) return null;
if (!sourceDirectives.versionWithinLimit(params.getVersion())) return null;
if (!sourceDirectives.versionWithinLimit(getClasspathVersion())) return null;
if (!sourceDirectives.versionWithinLimit(version)) return null;
if (!sourceDirectives.runOnPlatform(platform)) return null;
} catch (AssertionError ae) {
directiveFailure = ae;
}
@@ -73,6 +73,7 @@ public abstract class AbstractRunTests {
if (expected.isIgnore()) return null;
if (!expected.versionWithinLimit(params.getVersion())) return null;
if (!expected.versionWithinLimit(version)) return null;
final LombokTestSource sourceDirectives_ = sourceDirectives;
final AssertionError directiveFailure_ = directiveFailure;
@@ -98,22 +99,6 @@ public abstract class AbstractRunTests {
};
}
private static int getClasspathVersion() {
try {
Class.forName("java.lang.AutoCloseable");
} catch (ClassNotFoundException e) {
return 6;
}
try {
Class.forName("java.util.stream.Stream");
} catch (ClassNotFoundException e) {
return 7;
}
return 8;
}
protected abstract boolean transformCode(Collection<CompilerMessage> messages, StringWriter result, File file, String encoding, Map<String, String> formatPreferences) throws Throwable;
protected String readFile(File file) throws IOException {
+2 -3
View File
@@ -155,12 +155,11 @@ public class DirectoryRunner extends Runner {
private FileTester createTester(String fileName) throws IOException {
File file = new File(params.getBeforeDirectory(), fileName);
switch (params.getCompiler()) {
case DELOMBOK:
return new RunTestsViaDelombok().createTester(params, file);
return new RunTestsViaDelombok().createTester(params, file, "javac", params.getVersion());
case ECJ:
return new RunTestsViaEcj().createTester(params, file);
return new RunTestsViaEcj().createTester(params, file, "ecj", params.getVersion());
default:
case JAVAC:
throw new UnsupportedOperationException();
@@ -29,6 +29,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@@ -55,7 +56,14 @@ public class LombokTestSource {
private final int versionLowerLimit, versionUpperLimit;
private final ConfigurationResolver configuration;
private final String specifiedEncoding;
private final List<String> platforms;
public boolean runOnPlatform(String platform) {
if (platforms == null || platforms.isEmpty()) return true;
for (String pl : platforms) if (pl.equalsIgnoreCase(platform)) return true;
return false;
}
public boolean versionWithinLimit(int version) {
return version >= versionLowerLimit && version <= versionUpperLimit;
}
@@ -145,6 +153,7 @@ public class LombokTestSource {
boolean unchanged = false;
String encoding = null;
Map<String, String> formats = new HashMap<String, String>();
String[] platformLimit = null;
for (String directive : directives) {
directive = directive.trim();
@@ -164,6 +173,14 @@ public class LombokTestSource {
continue;
}
if (lc.startsWith("platform ")) {
String platformDesc = lc.substring("platform ".length());
int idx = platformDesc.indexOf(':');
if (idx != -1) platformDesc = platformDesc.substring(0, idx).trim();
platformLimit = platformDesc.split("\\s*,\\s*");
continue;
}
if (lc.startsWith("version ")) {
int[] limits = parseVersionLimit(lc.substring(7).trim());
if (limits == null) {
@@ -207,6 +224,7 @@ public class LombokTestSource {
this.ignore = ignore;
this.skipCompareContent = skipCompareContent;
this.unchanged = unchanged;
this.platforms = platformLimit == null ? null : Arrays.asList(platformLimit);
ConfigurationProblemReporter reporter = new ConfigurationProblemReporter() {
@Override public void report(String sourceDescription, String problem, int lineNumber, CharSequence line) {
Assert.fail("Problem on directive line: " + problem + " at conf line #" + lineNumber + " (" + line + ")");
@@ -1,3 +1,4 @@
//VERSION 7:
import static java.lang.String.*;
import java.io.*;
@@ -0,0 +1,19 @@
// Compile with javac, it'll think the T in the generated build() method isn't type compatible.
// Yet, when you take the delomboked output (which delombok will give, but with errors), THAT does compile.
public class I1132RecursiveGenerics {
public static class Recursive<T extends Recursive<T>> {}
public static final class Rec extends Recursive<Rec> {}
@lombok.Builder(builderClassName = "MethodBuilder")
public static <T extends Recursive<T>> T create() {
return null;
}
public static void main(String[] args) {
final MethodBuilder<Rec> builder = I1132RecursiveGenerics.builder();
final Rec rec = builder.build();
// final Rec rec = I1132RecursiveGenerics.<Rec>builder().build();
}
}
@@ -0,0 +1,5 @@
public class I1302BuilderInInstanceInnerClass {
@lombok.Builder public class NonStaticInner {
private int test;
}
}
@@ -2,13 +2,11 @@ class AccessorsFluent {
private String fieldName = "";
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String fieldName() {
return this.fieldName;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public AccessorsFluent fieldName(final String fieldName) {
this.fieldName = fieldName;
return this;
@@ -19,19 +17,16 @@ class AccessorsFluentOnClass {
private String otherFieldWithOverride = "";
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String fieldName() {
return this.fieldName;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getOtherFieldWithOverride() {
return this.otherFieldWithOverride;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public AccessorsFluentOnClass fieldName(final String fieldName) {
this.fieldName = fieldName;
return this;
@@ -41,7 +36,6 @@ class AccessorsChain {
private boolean isRunning;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public AccessorsChain setRunning(final boolean isRunning) {
this.isRunning = isRunning;
return this;
@@ -52,7 +46,6 @@ class AccessorsPrefix {
private String fActualField;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setActualField(final String fActualField) {
this.fActualField = fActualField;
}
@@ -62,13 +55,11 @@ class AccessorsPrefix2 {
private String fActualField;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setFieldName(final String fieldName) {
this.fieldName = fieldName;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setActualField(final String fActualField) {
this.fActualField = fActualField;
}
@@ -81,14 +72,12 @@ class AccessorsPrefix3 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "AccessorsPrefix3(fName=" + this.getName() + ")";
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof AccessorsPrefix3)) return false;
@@ -101,14 +90,12 @@ class AccessorsPrefix3 {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof AccessorsPrefix3;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -121,7 +108,6 @@ class AccessorsFluentGenerics<T extends Number> {
private String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public AccessorsFluentGenerics<T> name(final String name) {
this.name = name;
return this;
@@ -131,7 +117,6 @@ class AccessorsFluentNoChaining {
private String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void name(final String name) {
this.name = name;
}
@@ -140,8 +125,7 @@ class AccessorsFluentStatic<T extends Number> {
private static String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static void name(final String name) {
AccessorsFluentStatic.name = name;
}
}
}
@@ -2,13 +2,11 @@ class AccessorsConfiguration {
private String m_FieldName = "";
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String fieldName() {
return this.m_FieldName;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void fieldName(final String m_FieldName) {
this.m_FieldName = m_FieldName;
}
@@ -17,7 +15,6 @@ class AccessorsConfiguration2 {
private String m_FieldName = "";
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setM_FieldName(final String m_FieldName) {
this.m_FieldName = m_FieldName;
}
@@ -26,9 +23,8 @@ class AccessorsConfiguration3 {
private String fFieldName = "";
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public AccessorsConfiguration3 setFieldName(final String fFieldName) {
this.fFieldName = fFieldName;
return this;
}
}
}
@@ -2,47 +2,39 @@ class BuilderChainAndFluent {
private final int yes;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderChainAndFluent(final int yes) {
this.yes = yes;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderChainAndFluentBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int yes;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderChainAndFluentBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setYes(final int yes) {
this.yes = yes;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderChainAndFluent build() {
return new BuilderChainAndFluent(yes);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderChainAndFluent.BuilderChainAndFluentBuilder(yes=" + this.yes + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static BuilderChainAndFluentBuilder builder() {
return new BuilderChainAndFluentBuilder();
}
}
}
@@ -4,75 +4,62 @@ class BuilderComplex {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class VoidBuilder<T extends Number> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private T number;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int arg2;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private String arg3;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private BuilderComplex selfRef;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
VoidBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public VoidBuilder<T> number(final T number) {
this.number = number;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public VoidBuilder<T> arg2(final int arg2) {
this.arg2 = arg2;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public VoidBuilder<T> arg3(final String arg3) {
this.arg3 = arg3;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public VoidBuilder<T> selfRef(final BuilderComplex selfRef) {
this.selfRef = selfRef;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void execute() {
BuilderComplex.<T>testVoidWithGenerics(number, arg2, arg3, selfRef);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderComplex.VoidBuilder(number=" + this.number + ", arg2=" + this.arg2 + ", arg3=" + this.arg3 + ", selfRef=" + this.selfRef + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T extends Number> VoidBuilder<T> builder() {
return new VoidBuilder<T>();
}
}
}
@@ -5,74 +5,61 @@ class BuilderInstanceMethod<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public class StringBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int show;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int yes;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private List<T> also;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int $andMe;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
StringBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StringBuilder show(final int show) {
this.show = show;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StringBuilder yes(final int yes) {
this.yes = yes;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StringBuilder also(final List<T> also) {
this.also = also;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StringBuilder $andMe(final int $andMe) {
this.$andMe = $andMe;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String build() {
return BuilderInstanceMethod.this.create(show, yes, also, $andMe);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderInstanceMethod.StringBuilder(show=" + this.show + ", yes=" + this.yes + ", also=" + this.also + ", $andMe=" + this.$andMe + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StringBuilder builder() {
return new StringBuilder();
}
@@ -6,59 +6,49 @@ class BuilderSimple<T> {
private int $butNotMe;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSimple(final int yes, final List<T> also) {
this.yes = yes;
this.also = also;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderSimpleBuilder<T> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int yes;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private List<T> also;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSimpleBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSimpleBuilder<T> yes(final int yes) {
this.yes = yes;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSimpleBuilder<T> also(final List<T> also) {
this.also = also;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSimple<T> build() {
return new BuilderSimple<T>(yes, also);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderSimple.BuilderSimpleBuilder(yes=" + this.yes + ", also=" + this.also + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T> BuilderSimpleBuilder<T> builder() {
return new BuilderSimpleBuilder<T>();
}
@@ -12,7 +12,6 @@ class BuilderSingularGuavaListsSets<T> {
private ImmutableTable<? extends Number, ? extends Number, String> users;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularGuavaListsSets(final ImmutableList<T> cards, final ImmutableCollection<? extends Number> frogs, final ImmutableSet rawSet, final ImmutableSortedSet<String> passes, final ImmutableTable<? extends Number, ? extends Number, String> users) {
this.cards = cards;
this.frogs = frogs;
@@ -22,36 +21,28 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderSingularGuavaListsSetsBuilder<T> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableList.Builder<T> cards;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableList.Builder<Number> frogs;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableSet.Builder<java.lang.Object> rawSet;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableSortedSet.Builder<String> passes;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableTable.Builder<Number, Number, String> users;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularGuavaListsSetsBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> card(final T card) {
if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder();
this.cards.add(card);
@@ -59,7 +50,6 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> cards(final java.lang.Iterable<? extends T> cards) {
if (this.cards == null) this.cards = com.google.common.collect.ImmutableList.builder();
this.cards.addAll(cards);
@@ -67,14 +57,12 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> clearCards() {
this.cards = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> frog(final Number frog) {
if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder();
this.frogs.add(frog);
@@ -82,7 +70,6 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> frogs(final java.lang.Iterable<? extends Number> frogs) {
if (this.frogs == null) this.frogs = com.google.common.collect.ImmutableList.builder();
this.frogs.addAll(frogs);
@@ -90,14 +77,12 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> clearFrogs() {
this.frogs = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> rawSet(final java.lang.Object rawSet) {
if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder();
this.rawSet.add(rawSet);
@@ -105,7 +90,6 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> rawSet(final java.lang.Iterable<?> rawSet) {
if (this.rawSet == null) this.rawSet = com.google.common.collect.ImmutableSet.builder();
this.rawSet.addAll(rawSet);
@@ -113,14 +97,12 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> clearRawSet() {
this.rawSet = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> pass(final String pass) {
if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder();
this.passes.add(pass);
@@ -128,7 +110,6 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> passes(final java.lang.Iterable<? extends String> passes) {
if (this.passes == null) this.passes = com.google.common.collect.ImmutableSortedSet.naturalOrder();
this.passes.addAll(passes);
@@ -136,14 +117,12 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> clearPasses() {
this.passes = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> user(final Number rowKey, final Number columnKey, final String value) {
if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder();
this.users.put(rowKey, columnKey, value);
@@ -151,7 +130,6 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> users(final com.google.common.collect.Table<? extends Number, ? extends Number, ? extends String> users) {
if (this.users == null) this.users = com.google.common.collect.ImmutableTable.builder();
this.users.putAll(users);
@@ -159,14 +137,12 @@ class BuilderSingularGuavaListsSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSetsBuilder<T> clearUsers() {
this.users = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaListsSets<T> build() {
com.google.common.collect.ImmutableList<T> cards = this.cards == null ? com.google.common.collect.ImmutableList.<T>of() : this.cards.build();
com.google.common.collect.ImmutableCollection<Number> frogs = this.frogs == null ? com.google.common.collect.ImmutableList.<Number>of() : this.frogs.build();
@@ -178,15 +154,13 @@ class BuilderSingularGuavaListsSets<T> {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderSingularGuavaListsSets.BuilderSingularGuavaListsSetsBuilder(cards=" + this.cards + ", frogs=" + this.frogs + ", rawSet=" + this.rawSet + ", passes=" + this.passes + ", users=" + this.users + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T> BuilderSingularGuavaListsSetsBuilder<T> builder() {
return new BuilderSingularGuavaListsSetsBuilder<T>();
}
}
}
@@ -8,7 +8,6 @@ class BuilderSingularGuavaMaps<K, V> {
private ImmutableBiMap rawMap;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularGuavaMaps(final ImmutableMap<K, V> battleaxes, final ImmutableSortedMap<Integer, ? extends V> vertices, final ImmutableBiMap rawMap) {
this.battleaxes = battleaxes;
this.vertices = vertices;
@@ -16,28 +15,22 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderSingularGuavaMapsBuilder<K, V> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableMap.Builder<K, V> battleaxes;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableSortedMap.Builder<Integer, V> vertices;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableBiMap.Builder<java.lang.Object, java.lang.Object> rawMap;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularGuavaMapsBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> battleaxe(final K key, final V value) {
if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder();
this.battleaxes.put(key, value);
@@ -45,7 +38,6 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> battleaxes(final java.util.Map<? extends K, ? extends V> battleaxes) {
if (this.battleaxes == null) this.battleaxes = com.google.common.collect.ImmutableMap.builder();
this.battleaxes.putAll(battleaxes);
@@ -53,14 +45,12 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> clearBattleaxes() {
this.battleaxes = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> vertex(final Integer key, final V value) {
if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder();
this.vertices.put(key, value);
@@ -68,7 +58,6 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> vertices(final java.util.Map<? extends Integer, ? extends V> vertices) {
if (this.vertices == null) this.vertices = com.google.common.collect.ImmutableSortedMap.naturalOrder();
this.vertices.putAll(vertices);
@@ -76,14 +65,12 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> clearVertices() {
this.vertices = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> rawMap(final java.lang.Object key, final java.lang.Object value) {
if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder();
this.rawMap.put(key, value);
@@ -91,7 +78,6 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> rawMap(final java.util.Map<?, ?> rawMap) {
if (this.rawMap == null) this.rawMap = com.google.common.collect.ImmutableBiMap.builder();
this.rawMap.putAll(rawMap);
@@ -99,14 +85,12 @@ class BuilderSingularGuavaMaps<K, V> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMapsBuilder<K, V> clearRawMap() {
this.rawMap = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularGuavaMaps<K, V> build() {
com.google.common.collect.ImmutableMap<K, V> battleaxes = this.battleaxes == null ? com.google.common.collect.ImmutableMap.<K, V>of() : this.battleaxes.build();
com.google.common.collect.ImmutableSortedMap<Integer, V> vertices = this.vertices == null ? com.google.common.collect.ImmutableSortedMap.<Integer, V>of() : this.vertices.build();
@@ -116,15 +100,13 @@ class BuilderSingularGuavaMaps<K, V> {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderSingularGuavaMaps.BuilderSingularGuavaMapsBuilder(battleaxes=" + this.battleaxes + ", vertices=" + this.vertices + ", rawMap=" + this.rawMap + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <K, V> BuilderSingularGuavaMapsBuilder<K, V> builder() {
return new BuilderSingularGuavaMapsBuilder<K, V>();
}
}
}
@@ -7,7 +7,6 @@ class BuilderSingularLists<T> {
private List rawList;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularLists(final List<T> children, final Collection<? extends Number> scarves, final List rawList) {
this.children = children;
this.scarves = scarves;
@@ -15,28 +14,22 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderSingularListsBuilder<T> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<T> children;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<Number> scarves;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<java.lang.Object> rawList;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularListsBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> child(final T child) {
if (this.children == null) this.children = new java.util.ArrayList<T>();
this.children.add(child);
@@ -44,7 +37,6 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> children(final java.util.Collection<? extends T> children) {
if (this.children == null) this.children = new java.util.ArrayList<T>();
this.children.addAll(children);
@@ -52,14 +44,12 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> clearChildren() {
if (this.children != null) this.children.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> scarf(final Number scarf) {
if (this.scarves == null) this.scarves = new java.util.ArrayList<Number>();
this.scarves.add(scarf);
@@ -67,7 +57,6 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> scarves(final java.util.Collection<? extends Number> scarves) {
if (this.scarves == null) this.scarves = new java.util.ArrayList<Number>();
this.scarves.addAll(scarves);
@@ -75,14 +64,12 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> clearScarves() {
if (this.scarves != null) this.scarves.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> rawList(final java.lang.Object rawList) {
if (this.rawList == null) this.rawList = new java.util.ArrayList<java.lang.Object>();
this.rawList.add(rawList);
@@ -90,7 +77,6 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> rawList(final java.util.Collection<?> rawList) {
if (this.rawList == null) this.rawList = new java.util.ArrayList<java.lang.Object>();
this.rawList.addAll(rawList);
@@ -98,14 +84,12 @@ class BuilderSingularLists<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularListsBuilder<T> clearRawList() {
if (this.rawList != null) this.rawList.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularLists<T> build() {
java.util.List<T> children;
switch (this.children == null ? 0 : this.children.size()) {
@@ -145,14 +129,12 @@ class BuilderSingularLists<T> {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderSingularLists.BuilderSingularListsBuilder(children=" + this.children + ", scarves=" + this.scarves + ", rawList=" + this.rawList + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T> BuilderSingularListsBuilder<T> builder() {
return new BuilderSingularListsBuilder<T>();
}
@@ -5,7 +5,6 @@ class BuilderSingularNoAuto {
private List<String> items;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularNoAuto(final List<String> things, final List<String> widgets, final List<String> items) {
this.things = things;
this.widgets = widgets;
@@ -13,28 +12,22 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderSingularNoAutoBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<String> things;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<String> widgets;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<String> items;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularNoAutoBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder things(final String things) {
if (this.things == null) this.things = new java.util.ArrayList<String>();
this.things.add(things);
@@ -42,7 +35,6 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder things(final java.util.Collection<? extends String> things) {
if (this.things == null) this.things = new java.util.ArrayList<String>();
this.things.addAll(things);
@@ -50,14 +42,12 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder clearThings() {
if (this.things != null) this.things.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder widget(final String widget) {
if (this.widgets == null) this.widgets = new java.util.ArrayList<String>();
this.widgets.add(widget);
@@ -65,7 +55,6 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder widgets(final java.util.Collection<? extends String> widgets) {
if (this.widgets == null) this.widgets = new java.util.ArrayList<String>();
this.widgets.addAll(widgets);
@@ -73,14 +62,12 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder clearWidgets() {
if (this.widgets != null) this.widgets.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder items(final String items) {
if (this.items == null) this.items = new java.util.ArrayList<String>();
this.items.add(items);
@@ -88,7 +75,6 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder items(final java.util.Collection<? extends String> items) {
if (this.items == null) this.items = new java.util.ArrayList<String>();
this.items.addAll(items);
@@ -96,14 +82,12 @@ class BuilderSingularNoAuto {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAutoBuilder clearItems() {
if (this.items != null) this.items.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularNoAuto build() {
java.util.List<String> things;
switch (this.things == null ? 0 : this.things.size()) {
@@ -143,15 +127,13 @@ class BuilderSingularNoAuto {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderSingularNoAuto.BuilderSingularNoAutoBuilder(things=" + this.things + ", widgets=" + this.widgets + ", items=" + this.items + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static BuilderSingularNoAutoBuilder builder() {
return new BuilderSingularNoAutoBuilder();
}
}
}
@@ -7,7 +7,6 @@ class BuilderSingularRedirectToGuava {
private Collection<Class<?>> doohickeys;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularRedirectToGuava(final Set<String> dangerMice, final NavigableMap<Integer, Number> things, final Collection<Class<?>> doohickeys) {
this.dangerMice = dangerMice;
this.things = things;
@@ -15,28 +14,22 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderSingularRedirectToGuavaBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableSet.Builder<String> dangerMice;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableSortedMap.Builder<Integer, Number> things;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private com.google.common.collect.ImmutableList.Builder<Class<?>> doohickeys;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularRedirectToGuavaBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder dangerMouse(final String dangerMouse) {
if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder();
this.dangerMice.add(dangerMouse);
@@ -44,7 +37,6 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder dangerMice(final java.lang.Iterable<? extends String> dangerMice) {
if (this.dangerMice == null) this.dangerMice = com.google.common.collect.ImmutableSet.builder();
this.dangerMice.addAll(dangerMice);
@@ -52,14 +44,12 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder clearDangerMice() {
this.dangerMice = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder thing(final Integer key, final Number value) {
if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder();
this.things.put(key, value);
@@ -67,7 +57,6 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder things(final java.util.Map<? extends Integer, ? extends Number> things) {
if (this.things == null) this.things = com.google.common.collect.ImmutableSortedMap.naturalOrder();
this.things.putAll(things);
@@ -75,14 +64,12 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder clearThings() {
this.things = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder doohickey(final Class<?> doohickey) {
if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder();
this.doohickeys.add(doohickey);
@@ -90,7 +77,6 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder doohickeys(final java.lang.Iterable<? extends Class<?>> doohickeys) {
if (this.doohickeys == null) this.doohickeys = com.google.common.collect.ImmutableList.builder();
this.doohickeys.addAll(doohickeys);
@@ -98,14 +84,12 @@ class BuilderSingularRedirectToGuava {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuavaBuilder clearDoohickeys() {
this.doohickeys = null;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularRedirectToGuava build() {
java.util.Set<String> dangerMice = this.dangerMice == null ? com.google.common.collect.ImmutableSet.<String>of() : this.dangerMice.build();
java.util.NavigableMap<Integer, Number> things = this.things == null ? com.google.common.collect.ImmutableSortedMap.<Integer, Number>of() : this.things.build();
@@ -115,15 +99,13 @@ class BuilderSingularRedirectToGuava {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderSingularRedirectToGuava.BuilderSingularRedirectToGuavaBuilder(dangerMice=" + this.dangerMice + ", things=" + this.things + ", doohickeys=" + this.doohickeys + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static BuilderSingularRedirectToGuavaBuilder builder() {
return new BuilderSingularRedirectToGuavaBuilder();
}
}
}
@@ -8,7 +8,6 @@ class BuilderSingularSets<T> {
private Set<String> stringSet;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularSets(final Set<T> dangerMice, final SortedSet<? extends Number> octopodes, final Set rawSet, final Set<String> stringSet) {
this.dangerMice = dangerMice;
this.octopodes = octopodes;
@@ -17,32 +16,25 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderSingularSetsBuilder<T> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<T> dangerMice;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<Number> octopodes;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<java.lang.Object> rawSet;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<String> stringSet;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularSetsBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> dangerMouse(final T dangerMouse) {
if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList<T>();
this.dangerMice.add(dangerMouse);
@@ -50,7 +42,6 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> dangerMice(final java.util.Collection<? extends T> dangerMice) {
if (this.dangerMice == null) this.dangerMice = new java.util.ArrayList<T>();
this.dangerMice.addAll(dangerMice);
@@ -58,14 +49,12 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> clearDangerMice() {
if (this.dangerMice != null) this.dangerMice.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> octopus(final Number octopus) {
if (this.octopodes == null) this.octopodes = new java.util.ArrayList<Number>();
this.octopodes.add(octopus);
@@ -73,7 +62,6 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> octopodes(final java.util.Collection<? extends Number> octopodes) {
if (this.octopodes == null) this.octopodes = new java.util.ArrayList<Number>();
this.octopodes.addAll(octopodes);
@@ -81,14 +69,12 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> clearOctopodes() {
if (this.octopodes != null) this.octopodes.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> rawSet(final java.lang.Object rawSet) {
if (this.rawSet == null) this.rawSet = new java.util.ArrayList<java.lang.Object>();
this.rawSet.add(rawSet);
@@ -96,7 +82,6 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> rawSet(final java.util.Collection<?> rawSet) {
if (this.rawSet == null) this.rawSet = new java.util.ArrayList<java.lang.Object>();
this.rawSet.addAll(rawSet);
@@ -104,14 +89,12 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> clearRawSet() {
if (this.rawSet != null) this.rawSet.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> stringSet(final String stringSet) {
if (this.stringSet == null) this.stringSet = new java.util.ArrayList<String>();
this.stringSet.add(stringSet);
@@ -119,7 +102,6 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> stringSet(final java.util.Collection<? extends String> stringSet) {
if (this.stringSet == null) this.stringSet = new java.util.ArrayList<String>();
this.stringSet.addAll(stringSet);
@@ -127,14 +109,12 @@ class BuilderSingularSets<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSetsBuilder<T> clearStringSet() {
if (this.stringSet != null) this.stringSet.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularSets<T> build() {
java.util.Set<T> dangerMice;
switch (this.dangerMice == null ? 0 : this.dangerMice.size()) {
@@ -183,15 +163,13 @@ class BuilderSingularSets<T> {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderSingularSets.BuilderSingularSetsBuilder(dangerMice=" + this.dangerMice + ", octopodes=" + this.octopodes + ", rawSet=" + this.rawSet + ", stringSet=" + this.stringSet + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T> BuilderSingularSetsBuilder<T> builder() {
return new BuilderSingularSetsBuilder<T>();
}
}
}
@@ -2,26 +2,21 @@ class BuilderSingularWithPrefixes {
private java.util.List<String> _elems;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularWithPrefixes(final java.util.List<String> elems) {
this._elems = elems;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderSingularWithPrefixesBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<String> elems;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderSingularWithPrefixesBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularWithPrefixesBuilder elem(final String elem) {
if (this.elems == null) this.elems = new java.util.ArrayList<String>();
this.elems.add(elem);
@@ -29,7 +24,6 @@ class BuilderSingularWithPrefixes {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularWithPrefixesBuilder elems(final java.util.Collection<? extends String> elems) {
if (this.elems == null) this.elems = new java.util.ArrayList<String>();
this.elems.addAll(elems);
@@ -37,14 +31,12 @@ class BuilderSingularWithPrefixes {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularWithPrefixesBuilder clearElems() {
if (this.elems != null) this.elems.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderSingularWithPrefixes build() {
java.util.List<String> elems;
switch (this.elems == null ? 0 : this.elems.size()) {
@@ -62,15 +54,13 @@ class BuilderSingularWithPrefixes {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderSingularWithPrefixes.BuilderSingularWithPrefixesBuilder(elems=" + this.elems + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static BuilderSingularWithPrefixesBuilder builder() {
return new BuilderSingularWithPrefixesBuilder();
}
}
}
@@ -3,48 +3,40 @@ final class BuilderAndValue {
private final int zero = 0;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderAndValue() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderAndValueBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderAndValueBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderAndValue build() {
return new BuilderAndValue();
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderAndValue.BuilderAndValueBuilder()";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static BuilderAndValueBuilder builder() {
return new BuilderAndValueBuilder();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getZero() {
return this.zero;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof BuilderAndValue)) return false;
@@ -55,7 +47,6 @@ final class BuilderAndValue {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -65,7 +56,6 @@ final class BuilderAndValue {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderAndValue(zero=" + this.getZero() + ")";
}
@@ -75,48 +65,40 @@ class BuilderAndData {
private final int zero = 0;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderAndData() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderAndDataBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderAndDataBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderAndData build() {
return new BuilderAndData();
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderAndData.BuilderAndDataBuilder()";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static BuilderAndDataBuilder builder() {
return new BuilderAndDataBuilder();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getZero() {
return this.zero;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof BuilderAndData)) return false;
@@ -127,14 +109,12 @@ class BuilderAndData {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof BuilderAndData;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -144,7 +124,6 @@ class BuilderAndData {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderAndData(zero=" + this.getZero() + ")";
}
@@ -5,7 +5,6 @@ class BuilderWithAccessors {
private int __bar;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderWithAccessors(final int plower, final int upper, final int foo, final int _bar) {
this.plower = plower;
this.pUpper = upper;
@@ -14,75 +13,62 @@ class BuilderWithAccessors {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderWithAccessorsBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int plower;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int upper;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int foo;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int _bar;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderWithAccessorsBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithAccessorsBuilder plower(final int plower) {
this.plower = plower;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithAccessorsBuilder upper(final int upper) {
this.upper = upper;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithAccessorsBuilder foo(final int foo) {
this.foo = foo;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithAccessorsBuilder _bar(final int _bar) {
this._bar = _bar;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithAccessors build() {
return new BuilderWithAccessors(plower, upper, foo, _bar);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderWithAccessors.BuilderWithAccessorsBuilder(plower=" + this.plower + ", upper=" + this.upper + ", foo=" + this.foo + ", _bar=" + this._bar + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static BuilderWithAccessorsBuilder builder() {
return new BuilderWithAccessorsBuilder();
}
}
}
@@ -5,52 +5,44 @@ class BuilderWithExistingBuilderClass<T, K extends Number> {
public static class BuilderWithExistingBuilderClassBuilder<Z extends Number> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private boolean arg2;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private String arg3;
private Z arg1;
public void arg2(boolean arg) {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderWithExistingBuilderClassBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithExistingBuilderClassBuilder<Z> arg1(final Z arg1) {
this.arg1 = arg1;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithExistingBuilderClassBuilder<Z> arg3(final String arg3) {
this.arg3 = arg3;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithExistingBuilderClass build() {
return BuilderWithExistingBuilderClass.<Z>staticMethod(arg1, arg2, arg3);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderWithExistingBuilderClass.BuilderWithExistingBuilderClassBuilder(arg1=" + this.arg1 + ", arg2=" + this.arg2 + ", arg3=" + this.arg3 + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <Z extends Number> BuilderWithExistingBuilderClassBuilder<Z> builder() {
return new BuilderWithExistingBuilderClassBuilder<Z>();
}
}
}
@@ -0,0 +1,100 @@
import java.util.Set;
public class BuilderWithRecursiveGenerics {
interface Inter<T, U extends Inter<T, U>> {
}
public static final class Test<Foo, Bar extends Set<Foo>, Quz extends Inter<Bar, Quz>> {
private final Foo foo;
private final Bar bar;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
Test(final Foo foo, final Bar bar) {
this.foo = foo;
this.bar = bar;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public static class TestBuilder<Foo, Bar extends Set<Foo>, Quz extends Inter<Bar, Quz>> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private Foo foo;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
private Bar bar;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
TestBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public TestBuilder<Foo, Bar, Quz> foo(final Foo foo) {
this.foo = foo;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public TestBuilder<Foo, Bar, Quz> bar(final Bar bar) {
this.bar = bar;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Test<Foo, Bar, Quz> build() {
return new Test<Foo, Bar, Quz>(foo, bar);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "BuilderWithRecursiveGenerics.Test.TestBuilder(foo=" + this.foo + ", bar=" + this.bar + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public static <Foo, Bar extends Set<Foo>, Quz extends Inter<Bar, Quz>> TestBuilder<Foo, Bar, Quz> builder() {
return new TestBuilder<Foo, Bar, Quz>();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Foo getFoo() {
return this.foo;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Bar getBar() {
return this.bar;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof BuilderWithRecursiveGenerics.Test)) return false;
final BuilderWithRecursiveGenerics.Test<?, ?, ?> other = (BuilderWithRecursiveGenerics.Test<?, ?, ?>) o;
final java.lang.Object this$foo = this.getFoo();
final java.lang.Object other$foo = other.getFoo();
if (this$foo == null ? other$foo != null : !this$foo.equals(other$foo)) return false;
final java.lang.Object this$bar = this.getBar();
final java.lang.Object other$bar = other.getBar();
if (this$bar == null ? other$bar != null : !this$bar.equals(other$bar)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $foo = this.getFoo();
result = result * PRIME + ($foo == null ? 43 : $foo.hashCode());
final java.lang.Object $bar = this.getBar();
result = result * PRIME + ($bar == null ? 43 : $bar.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "BuilderWithRecursiveGenerics.Test(foo=" + this.getFoo() + ", bar=" + this.getBar() + ")";
}
}
}
@@ -9,7 +9,6 @@ class BuilderWithToBuilder<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderWithToBuilder(final String one, final String two, final T foo, final List<T> bars) {
this.mOne = one;
this.mTwo = two;
@@ -18,53 +17,43 @@ class BuilderWithToBuilder<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class BuilderWithToBuilderBuilder<T> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private String one;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private String two;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private T foo;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private java.util.ArrayList<T> bars;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderWithToBuilderBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithToBuilderBuilder<T> one(final String one) {
this.one = one;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithToBuilderBuilder<T> two(final String two) {
this.two = two;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithToBuilderBuilder<T> foo(final T foo) {
this.foo = foo;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithToBuilderBuilder<T> bar(final T bar) {
if (this.bars == null) this.bars = new java.util.ArrayList<T>();
this.bars.add(bar);
@@ -72,7 +61,6 @@ class BuilderWithToBuilder<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithToBuilderBuilder<T> bars(final java.util.Collection<? extends T> bars) {
if (this.bars == null) this.bars = new java.util.ArrayList<T>();
this.bars.addAll(bars);
@@ -80,14 +68,12 @@ class BuilderWithToBuilder<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithToBuilderBuilder<T> clearBars() {
if (this.bars != null) this.bars.clear();
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithToBuilder<T> build() {
java.util.List<T> bars;
switch (this.bars == null ? 0 : this.bars.size()) {
@@ -105,20 +91,17 @@ class BuilderWithToBuilder<T> {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderWithToBuilder.BuilderWithToBuilderBuilder(one=" + this.one + ", two=" + this.two + ", foo=" + this.foo + ", bars=" + this.bars + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T> BuilderWithToBuilderBuilder<T> builder() {
return new BuilderWithToBuilderBuilder<T>();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithToBuilderBuilder<T> toBuilder() {
return new BuilderWithToBuilderBuilder<T>().one(this.mOne).two(this.mTwo).foo(BuilderWithToBuilder.rrr(this)).bars(this.bars);
}
@@ -133,58 +116,48 @@ class ConstructorWithToBuilder<T> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class ConstructorWithToBuilderBuilder<T> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private String mOne;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private T bar;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
ConstructorWithToBuilderBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public ConstructorWithToBuilderBuilder<T> mOne(final String mOne) {
this.mOne = mOne;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public ConstructorWithToBuilderBuilder<T> bar(final T bar) {
this.bar = bar;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public ConstructorWithToBuilder<T> build() {
return new ConstructorWithToBuilder<T>(mOne, bar);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "ConstructorWithToBuilder.ConstructorWithToBuilderBuilder(mOne=" + this.mOne + ", bar=" + this.bar + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T> ConstructorWithToBuilderBuilder<T> builder() {
return new ConstructorWithToBuilderBuilder<T>();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public ConstructorWithToBuilderBuilder<T> toBuilder() {
return new ConstructorWithToBuilderBuilder<T>().mOne(this.mOne).bar(this.foo);
}
@@ -201,58 +174,48 @@ class StaticWithToBuilder<T, K> {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static class StaticWithToBuilderBuilder<Z> {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private String mOne;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private Z bar;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
StaticWithToBuilderBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StaticWithToBuilderBuilder<Z> mOne(final String mOne) {
this.mOne = mOne;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StaticWithToBuilderBuilder<Z> bar(final Z bar) {
this.bar = bar;
return this;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StaticWithToBuilder build() {
return StaticWithToBuilder.<Z>test(mOne, bar);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "StaticWithToBuilder.StaticWithToBuilderBuilder(mOne=" + this.mOne + ", bar=" + this.bar + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <Z> StaticWithToBuilderBuilder<Z> builder() {
return new StaticWithToBuilderBuilder<Z>();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public StaticWithToBuilderBuilder<T> toBuilder() {
return new StaticWithToBuilderBuilder<T>().mOne(this.mOne).bar(this.foo);
}
@@ -12,7 +12,6 @@ public class BuilderWithTolerate {
public static class BuilderWithTolerateBuilder {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private int value;
@Tolerate
@@ -22,13 +21,11 @@ public class BuilderWithTolerate {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderWithTolerateBuilder() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithTolerateBuilder value(final int value) {
this.value = value;
return this;
@@ -36,7 +33,6 @@ public class BuilderWithTolerate {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public BuilderWithTolerate build() {
return new BuilderWithTolerate(value);
}
@@ -44,7 +40,6 @@ public class BuilderWithTolerate {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "BuilderWithTolerate.BuilderWithTolerateBuilder(value=" + this.value + ")";
}
@@ -52,15 +47,13 @@ public class BuilderWithTolerate {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
BuilderWithTolerate(final int value) {
this.value = value;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static BuilderWithTolerateBuilder builder() {
return new BuilderWithTolerateBuilder();
}
}
}
@@ -2,7 +2,6 @@ class GetFoo {
private int foo;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getFoo() {
return this.foo;
}
@@ -13,7 +13,6 @@ public class CommentsInterspersed {
}-*/
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getTest() {
return this.test;
}
@@ -2,7 +2,6 @@ class ConflictingStaticConstructorNames {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof ConflictingStaticConstructorNames)) return false;
@@ -12,14 +11,12 @@ class ConflictingStaticConstructorNames {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof ConflictingStaticConstructorNames;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
int result = 1;
return result;
@@ -27,13 +24,11 @@ class ConflictingStaticConstructorNames {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "ConflictingStaticConstructorNames()";
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public ConflictingStaticConstructorNames() {
}
}
}
@@ -4,7 +4,6 @@ class RequiredArgsConstructor1 {
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public RequiredArgsConstructor1(final int x) {
this.x = x;
}
@@ -15,7 +14,6 @@ class RequiredArgsConstructorAccess {
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected RequiredArgsConstructorAccess(final int x) {
this.x = x;
}
@@ -25,13 +23,11 @@ class RequiredArgsConstructorStaticName {
String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private RequiredArgsConstructorStaticName(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static RequiredArgsConstructorStaticName staticname(final int x) {
return new RequiredArgsConstructorStaticName(x);
}
@@ -43,7 +39,6 @@ class RequiredArgsConstructorWithAnnotations {
@Deprecated
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public RequiredArgsConstructorWithAnnotations(final int x) {
this.x = x;
}
@@ -54,7 +49,6 @@ class AllArgsConstructor1 {
@java.beans.ConstructorProperties({"x", "name"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public AllArgsConstructor1(final int x, final String name) {
this.x = x;
this.name = name;
@@ -65,7 +59,6 @@ class NoArgsConstructor1 {
String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public NoArgsConstructor1() {
}
}
@@ -74,13 +67,11 @@ class RequiredArgsConstructorStaticNameGenerics<T extends Number> {
String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private RequiredArgsConstructorStaticNameGenerics(final T x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T extends Number> RequiredArgsConstructorStaticNameGenerics<T> of(final T x) {
return new RequiredArgsConstructorStaticNameGenerics<T>(x);
}
@@ -90,13 +81,11 @@ class RequiredArgsConstructorStaticNameGenerics2<T extends Number> {
String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private RequiredArgsConstructorStaticNameGenerics2(final Class<T> x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public static <T extends Number> RequiredArgsConstructorStaticNameGenerics2<T> of(final Class<T> x) {
return new RequiredArgsConstructorStaticNameGenerics2<T>(x);
}
@@ -105,7 +94,6 @@ class AllArgsConstructorPackageAccess {
final String x;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
AllArgsConstructorPackageAccess(final String x) {
this.x = x;
}
@@ -120,7 +108,6 @@ class NoArgsConstructor2 {
byte z;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public NoArgsConstructor2() {
this.x = 0;
this.y = 0.0;
@@ -2,18 +2,7 @@ class ConstructorsConfiguration {
int x;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public ConstructorsConfiguration(final int x) {
this.x = x;
}
}
class ConstructorsConfigurationExplicit {
int x;
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public ConstructorsConfigurationExplicit(final int x) {
this.x = x;
}
}
@@ -7,7 +7,6 @@ class ConstructorsWithAccessors {
@java.beans.ConstructorProperties({"plower", "upper", "huh", "_huh2"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public ConstructorsWithAccessors(final int plower, final int upper, final int huh, final int _huh2) {
this.plower = plower;
this.pUpper = upper;
@@ -2,20 +2,17 @@ class DataConfiguration {
final int x;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public DataConfiguration(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof DataConfiguration)) return false;
@@ -26,14 +23,12 @@ class DataConfiguration {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof DataConfiguration;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -43,7 +38,6 @@ class DataConfiguration {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "DataConfiguration(x=" + this.getX() + ")";
}
@@ -2,25 +2,21 @@ class DataExtended {
int x;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public DataExtended() {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setX(final int x) {
this.x = x;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof DataExtended)) return false;
@@ -31,14 +27,12 @@ class DataExtended {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof DataExtended;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -48,8 +42,7 @@ class DataExtended {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "DataExtended(x=" + this.x + ")";
}
}
}
@@ -4,20 +4,17 @@ class DataIgnore {
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public DataIgnore(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof DataIgnore)) return false;
@@ -28,14 +25,12 @@ class DataIgnore {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof DataIgnore;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -45,8 +40,7 @@ class DataIgnore {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "DataIgnore(x=" + this.getX() + ")";
}
}
}
@@ -3,21 +3,18 @@ public enum DataOnEnum {
private final String someField;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getSomeField() {
return this.someField;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "DataOnEnum(someField=" + this.getSomeField() + ")";
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
private DataOnEnum(final String someField) {
this.someField = someField;
}
}
}
@@ -5,32 +5,27 @@ class DataOnLocalClass1 {
String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public Local(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getName() {
return this.name;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setName(final String name) {
this.name = name;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Local)) return false;
@@ -44,14 +39,12 @@ class DataOnLocalClass1 {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Local;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -63,7 +56,6 @@ class DataOnLocalClass1 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Local(x=" + this.getX() + ", name=" + this.getName() + ")";
}
@@ -79,7 +71,6 @@ class DataOnLocalClass2 {
String name;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public InnerLocal(@lombok.NonNull final String name) {
if (name == null) {
throw new java.lang.NullPointerException("name");
@@ -89,13 +80,11 @@ class DataOnLocalClass2 {
@lombok.NonNull
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getName() {
return this.name;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setName(@lombok.NonNull final String name) {
if (name == null) {
throw new java.lang.NullPointerException("name");
@@ -105,11 +94,10 @@ class DataOnLocalClass2 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Local.InnerLocal)) return false;
final InnerLocal other = (InnerLocal) o;
final Local.InnerLocal other = (Local.InnerLocal) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$name = this.getName();
final java.lang.Object other$name = other.getName();
@@ -118,14 +106,12 @@ class DataOnLocalClass2 {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Local.InnerLocal;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -136,27 +122,23 @@ class DataOnLocalClass2 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Local.InnerLocal(name=" + this.getName() + ")";
}
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public Local(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Local)) return false;
@@ -167,14 +149,12 @@ class DataOnLocalClass2 {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Local;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -184,10 +164,9 @@ class DataOnLocalClass2 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Local(x=" + this.getX() + ")";
}
}
}
}
}
@@ -4,32 +4,27 @@ class Data1 {
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public Data1(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getName() {
return this.name;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setName(final String name) {
this.name = name;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Data1)) return false;
@@ -43,14 +38,12 @@ class Data1 {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Data1;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -62,7 +55,6 @@ class Data1 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Data1(x=" + this.getX() + ", name=" + this.getName() + ")";
}
@@ -73,32 +65,27 @@ class Data2 {
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public Data2(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getName() {
return this.name;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setName(final String name) {
this.name = name;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Data2)) return false;
@@ -112,14 +99,12 @@ class Data2 {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Data2;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -131,7 +116,6 @@ class Data2 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Data2(x=" + this.getX() + ", name=" + this.getName() + ")";
}
@@ -142,32 +126,27 @@ final class Data3 {
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public Data3(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getName() {
return this.name;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setName(final String name) {
this.name = name;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Data3)) return false;
@@ -181,7 +160,6 @@ final class Data3 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -193,7 +171,6 @@ final class Data3 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Data3(x=" + this.getX() + ", name=" + this.getName() + ")";
}
@@ -204,27 +181,23 @@ final class Data4 extends java.util.Timer {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setX(final int x) {
this.x = x;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Data4(x=" + this.getX() + ")";
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Data4)) return false;
@@ -236,14 +209,12 @@ final class Data4 extends java.util.Timer {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Data4;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -255,13 +226,11 @@ final class Data4 extends java.util.Timer {
class Data5 {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public Data5() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Data5)) return false;
@@ -271,14 +240,12 @@ class Data5 {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof Data5;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
int result = 1;
return result;
@@ -286,7 +253,6 @@ class Data5 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Data5()";
}
@@ -294,13 +260,11 @@ class Data5 {
final class Data6 {
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public Data6() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Data6)) return false;
@@ -309,7 +273,6 @@ final class Data6 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
int result = 1;
return result;
@@ -317,8 +280,7 @@ final class Data6 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "Data6()";
}
}
}
@@ -5,26 +5,22 @@ class DataWithGetter {
@java.beans.ConstructorProperties({"z"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public DataWithGetter(final String z) {
this.z = z;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setX(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setY(final int y) {
this.y = y;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof DataWithGetter)) return false;
@@ -39,14 +35,12 @@ class DataWithGetter {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof DataWithGetter;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -59,26 +53,22 @@ class DataWithGetter {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "DataWithGetter(x=" + this.getX() + ", y=" + this.getY() + ", z=" + this.getZ() + ")";
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getY() {
return this.y;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public String getZ() {
return this.z;
}
}
}
@@ -5,26 +5,22 @@ class DataWithGetterNone {
@java.beans.ConstructorProperties({"z"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public DataWithGetterNone(final String z) {
this.z = z;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setX(final int x) {
this.x = x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setY(final int y) {
this.y = y;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof DataWithGetterNone)) return false;
@@ -39,14 +35,12 @@ class DataWithGetterNone {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof DataWithGetterNone;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -59,8 +53,7 @@ class DataWithGetterNone {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "DataWithGetterNone(x=" + this.x + ", y=" + this.y + ", z=" + this.z + ")";
}
}
}
@@ -6,7 +6,6 @@ class DelegateOnGetter {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public Bar getBar() {
java.lang.Object value = this.bar.get();
if (value == null) {
@@ -29,14 +28,12 @@ class DelegateOnGetter {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setList(final java.util.ArrayList<java.lang.String> list) {
this.getBar().setList(list);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getInt() {
return this.getBar().getInt();
}
}
}
@@ -6,14 +6,12 @@ class DelegateOnGetterNone {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void setList(final java.util.ArrayList<java.lang.String> list) {
this.bar.setList(list);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getInt() {
return this.bar.getInt();
}
}
}
@@ -9,8 +9,7 @@ abstract class DelegateOnMethods {
@javax.annotation.Generated("lombok")
@lombok.Generated
public void bar(final java.util.ArrayList<java.lang.String> list) {
this.getBar().bar(list);
}
}
}
@@ -27,7 +27,6 @@ class DelegatePlain {
@javax.annotation.Generated("lombok")
@lombok.Generated
public void bar(final java.util.ArrayList<java.lang.String> list) {
this.bar.bar(list);
}
@@ -36,8 +35,7 @@ class DelegatePlain {
@javax.annotation.Generated("lombok")
@lombok.Generated
public void foo() {
this.foo.foo();
}
}
}
@@ -12,21 +12,18 @@ class DelegateWithDeprecated {
@java.lang.Deprecated
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void deprecatedAnnotation() {
this.bar.deprecatedAnnotation();
}
@java.lang.Deprecated
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void deprecatedComment() {
this.bar.deprecatedComment();
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void notDeprecated() {
this.bar.notDeprecated();
}
}
}
@@ -8,25 +8,21 @@ class DelegateWithVarargs {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void justOneParameter(final int... varargs) {
this.bar.justOneParameter(varargs);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void multipleParameters(final java.lang.String first, final int... varargs) {
this.bar.multipleParameters(first, varargs);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void array(final int[] array) {
this.bar.array(array);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public void arrayVarargs(final int[]... arrayVarargs) {
this.bar.arrayVarargs(arrayVarargs);
}
@@ -4,8 +4,7 @@ class EncodingUsAscii {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "EncodingUsAscii(foo\u0e51\u0e51=" + this.foo\u0e51\u0e51 + ")";
}
}
}
@@ -3,8 +3,7 @@ class EncodingUtf8 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public java.lang.String toString() {
return "EncodingUtf8(foo๑๑=" + this.foo๑๑ + ")";
}
}
}
@@ -7,7 +7,6 @@ class EqualsAndHashCode {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCode)) return false;
@@ -26,14 +25,12 @@ class EqualsAndHashCode {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCode;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -56,7 +53,6 @@ final class EqualsAndHashCode2 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCode2)) return false;
@@ -71,7 +67,6 @@ final class EqualsAndHashCode2 {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -89,7 +84,6 @@ final class EqualsAndHashCode3 extends EqualsAndHashCode {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCode3)) return false;
@@ -99,14 +93,12 @@ final class EqualsAndHashCode3 extends EqualsAndHashCode {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCode3;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
int result = 1;
return result;
@@ -116,7 +108,6 @@ class EqualsAndHashCode4 extends EqualsAndHashCode {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCode4)) return false;
@@ -127,18 +118,16 @@ class EqualsAndHashCode4 extends EqualsAndHashCode {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCode4;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = result * PRIME + super.hashCode();
return result;
}
}
}
@@ -2,7 +2,6 @@ class EqualsAndHashCodeConfigKeys1Parent {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeConfigKeys1Parent)) return false;
@@ -12,14 +11,12 @@ class EqualsAndHashCodeConfigKeys1Parent {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCodeConfigKeys1Parent;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
int result = 1;
return result;
@@ -30,7 +27,6 @@ class EqualsAndHashCodeConfigKeys1 extends EqualsAndHashCodeConfigKeys1Parent {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeConfigKeys1)) return false;
@@ -41,14 +37,12 @@ class EqualsAndHashCodeConfigKeys1 extends EqualsAndHashCodeConfigKeys1Parent {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCodeConfigKeys1;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -2,7 +2,6 @@ class EqualsAndHashCodeConfigKeys2Parent {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeConfigKeys2Parent)) return false;
@@ -12,14 +11,12 @@ class EqualsAndHashCodeConfigKeys2Parent {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCodeConfigKeys2Parent;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
int result = 1;
return result;
@@ -30,7 +27,6 @@ class EqualsAndHashCodeConfigKeys2 extends EqualsAndHashCodeConfigKeys2Parent {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeConfigKeys2)) return false;
@@ -42,14 +38,12 @@ class EqualsAndHashCodeConfigKeys2 extends EqualsAndHashCodeConfigKeys2Parent {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCodeConfigKeys2;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -0,0 +1,56 @@
interface EqualsAndHashCodeNestedShadow {
interface Foo {
}
class Bar {
public static class Foo extends Bar implements EqualsAndHashCodeNestedShadow.Foo {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeNestedShadow.Bar.Foo)) return false;
final EqualsAndHashCodeNestedShadow.Bar.Foo other = (EqualsAndHashCodeNestedShadow.Bar.Foo) o;
if (!other.canEqual((java.lang.Object) this)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCodeNestedShadow.Bar.Foo;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
int result = 1;
return result;
}
}
}
class Baz {
public static class Foo<T> extends Bar implements EqualsAndHashCodeNestedShadow.Foo {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeNestedShadow.Baz.Foo)) return false;
final EqualsAndHashCodeNestedShadow.Baz.Foo<?> other = (EqualsAndHashCodeNestedShadow.Baz.Foo<?>) o;
if (!other.canEqual((java.lang.Object) this)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof EqualsAndHashCodeNestedShadow.Baz.Foo;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
int result = 1;
return result;
}
}
}
}
@@ -18,7 +18,6 @@ final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithE
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeWithExistingMethods3)) return false;
@@ -31,7 +30,6 @@ final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithE
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -39,4 +37,4 @@ final class EqualsAndHashCodeWithExistingMethods3 extends EqualsAndHashCodeWithE
result = result * PRIME + this.x;
return result;
}
}
}
@@ -10,7 +10,6 @@ class EqualsAndHashCodeWithOnParam {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(@Nullable final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeWithOnParam)) return false;
@@ -29,14 +28,12 @@ class EqualsAndHashCodeWithOnParam {
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
protected boolean canEqual(@Nullable final java.lang.Object other) {
return other instanceof EqualsAndHashCodeWithOnParam;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -49,4 +46,4 @@ class EqualsAndHashCodeWithOnParam {
result = result * PRIME + ($b == null ? 43 : $b.hashCode());
return result;
}
}
}
@@ -4,7 +4,6 @@ final class EqualsAndHashCodeOf {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeOf)) return false;
@@ -15,7 +14,6 @@ final class EqualsAndHashCodeOf {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
@@ -29,7 +27,6 @@ final class EqualsAndHashCodeExclude {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof EqualsAndHashCodeExclude)) return false;
@@ -40,11 +37,10 @@ final class EqualsAndHashCodeExclude {
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = result * PRIME + this.x;
return result;
}
}
}
@@ -14,4 +14,4 @@ class ExtensionMethodPlain {
return "" + Character.toTitleCase(in.charAt(0)) + in.substring(1).toLowerCase();
}
}
}
}
@@ -10,4 +10,4 @@ class FieldDefaults2 {
static int STATIC = 3;
int x;
private int y;
}
}
@@ -1,2 +1,2 @@
class FieldDefaultsNoop {
}
}
@@ -8,4 +8,4 @@ class FieldDefaultsViaConfig1 {
class FieldDefaultsViaConfig2 {
final int x = 2;
protected final int y = 0;
}
}
@@ -3,8 +3,7 @@ class FieldDefaultsViaConfigAndRequiredArgsConstructor {
@java.beans.ConstructorProperties({"x"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public FieldDefaultsViaConfigAndRequiredArgsConstructor(final int x) {
this.x = x;
}
}
}
@@ -1,10 +1,10 @@
//VERSION 7:
class GenerateSuppressFBWarnings {
int y;
@java.lang.SuppressWarnings("all")
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getY() {
return this.y;
}
}
}
@@ -1,8 +1,7 @@
class GeneratedJavaxOff {
int x;
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int getX() {
return this.x;
}
}
}
@@ -1,8 +1,9 @@
class GeneratedGlobalOffJavaxOn {
class GeneratedJavaxOnLombokOn {
int x;
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
@lombok.Generated
public int getX() {
return this.x;
}
}
}
Loaded 100 of 332 files, more files were not shown because too many files have changed in this diff. Show more