aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/BuilderWithNonNull.java40
-rw-r--r--test/transform/resource/after-delombok/JacksonJsonProperty.java41
-rw-r--r--test/transform/resource/after-ecj/BuilderWithNonNull.java34
-rw-r--r--test/transform/resource/after-ecj/JacksonJsonProperty.java32
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderWithNonNull.java8
-rw-r--r--test/transform/resource/before/BuilderWithNonNull.java5
-rw-r--r--test/transform/resource/before/JacksonJsonProperty.java10
7 files changed, 170 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithNonNull.java b/test/transform/resource/after-delombok/BuilderWithNonNull.java
new file mode 100644
index 00000000..bee7d415
--- /dev/null
+++ b/test/transform/resource/after-delombok/BuilderWithNonNull.java
@@ -0,0 +1,40 @@
+class BuilderWithNonNull {
+ @lombok.NonNull
+ private final String id;
+ @java.lang.SuppressWarnings("all")
+ BuilderWithNonNull(@lombok.NonNull final String id) {
+ if (id == null) {
+ throw new java.lang.NullPointerException("id is marked non-null but is null");
+ }
+ this.id = id;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class BuilderWithNonNullBuilder {
+ @java.lang.SuppressWarnings("all")
+ private String id;
+ @java.lang.SuppressWarnings("all")
+ BuilderWithNonNullBuilder() {
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithNonNullBuilder id(@lombok.NonNull final String id) {
+ if (id == null) {
+ throw new java.lang.NullPointerException("id is marked non-null but is null");
+ }
+ this.id = id;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public BuilderWithNonNull build() {
+ return new BuilderWithNonNull(id);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "BuilderWithNonNull.BuilderWithNonNullBuilder(id=" + this.id + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ public static BuilderWithNonNullBuilder builder() {
+ return new BuilderWithNonNullBuilder();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/JacksonJsonProperty.java b/test/transform/resource/after-delombok/JacksonJsonProperty.java
new file mode 100644
index 00000000..842ba298
--- /dev/null
+++ b/test/transform/resource/after-delombok/JacksonJsonProperty.java
@@ -0,0 +1,41 @@
+import com.fasterxml.jackson.annotation.JsonProperty;
+public class JacksonJsonProperty {
+ @JsonProperty("kebab-case-prop")
+ public String kebabCaseProp;
+ @java.lang.SuppressWarnings("all")
+ JacksonJsonProperty(final String kebabCaseProp) {
+ this.kebabCaseProp = kebabCaseProp;
+ }
+ @java.lang.SuppressWarnings("all")
+ public static class JacksonJsonPropertyBuilder {
+ @java.lang.SuppressWarnings("all")
+ private String kebabCaseProp;
+ @java.lang.SuppressWarnings("all")
+ JacksonJsonPropertyBuilder() {
+ }
+ @JsonProperty("kebab-case-prop")
+ @java.lang.SuppressWarnings("all")
+ public JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) {
+ this.kebabCaseProp = kebabCaseProp;
+ return this;
+ }
+ @java.lang.SuppressWarnings("all")
+ public JacksonJsonProperty build() {
+ return new JacksonJsonProperty(kebabCaseProp);
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "JacksonJsonProperty.JacksonJsonPropertyBuilder(kebabCaseProp=" + this.kebabCaseProp + ")";
+ }
+ }
+ @java.lang.SuppressWarnings("all")
+ public static JacksonJsonPropertyBuilder builder() {
+ return new JacksonJsonPropertyBuilder();
+ }
+ @JsonProperty("kebab-case-prop")
+ @java.lang.SuppressWarnings("all")
+ public void setKebabCaseProp(final String kebabCaseProp) {
+ this.kebabCaseProp = kebabCaseProp;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/BuilderWithNonNull.java b/test/transform/resource/after-ecj/BuilderWithNonNull.java
new file mode 100644
index 00000000..a8ef93f0
--- /dev/null
+++ b/test/transform/resource/after-ecj/BuilderWithNonNull.java
@@ -0,0 +1,34 @@
+@lombok.Builder class BuilderWithNonNull {
+ public static @java.lang.SuppressWarnings("all") class BuilderWithNonNullBuilder {
+ private @java.lang.SuppressWarnings("all") String id;
+ @java.lang.SuppressWarnings("all") BuilderWithNonNullBuilder() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithNonNullBuilder id(final @lombok.NonNull String id) {
+ if ((id == null))
+ {
+ throw new java.lang.NullPointerException("id is marked non-null but is null");
+ }
+ this.id = id;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") BuilderWithNonNull build() {
+ return new BuilderWithNonNull(id);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("BuilderWithNonNull.BuilderWithNonNullBuilder(id=" + this.id) + ")");
+ }
+ }
+ private final @lombok.NonNull String id;
+ @java.lang.SuppressWarnings("all") BuilderWithNonNull(final @lombok.NonNull String id) {
+ super();
+ if ((id == null))
+ {
+ throw new java.lang.NullPointerException("id is marked non-null but is null");
+ }
+ this.id = id;
+ }
+ public static @java.lang.SuppressWarnings("all") BuilderWithNonNullBuilder builder() {
+ return new BuilderWithNonNullBuilder();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/JacksonJsonProperty.java b/test/transform/resource/after-ecj/JacksonJsonProperty.java
new file mode 100644
index 00000000..73049b2a
--- /dev/null
+++ b/test/transform/resource/after-ecj/JacksonJsonProperty.java
@@ -0,0 +1,32 @@
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Builder;
+import lombok.Setter;
+public @Builder class JacksonJsonProperty {
+ public static @java.lang.SuppressWarnings("all") class JacksonJsonPropertyBuilder {
+ private @java.lang.SuppressWarnings("all") String kebabCaseProp;
+ @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder() {
+ super();
+ }
+ public @JsonProperty("kebab-case-prop") @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder kebabCaseProp(final String kebabCaseProp) {
+ this.kebabCaseProp = kebabCaseProp;
+ return this;
+ }
+ public @java.lang.SuppressWarnings("all") JacksonJsonProperty build() {
+ return new JacksonJsonProperty(kebabCaseProp);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("JacksonJsonProperty.JacksonJsonPropertyBuilder(kebabCaseProp=" + this.kebabCaseProp) + ")");
+ }
+ }
+ public @JsonProperty("kebab-case-prop") @Setter String kebabCaseProp;
+ @java.lang.SuppressWarnings("all") JacksonJsonProperty(final String kebabCaseProp) {
+ super();
+ this.kebabCaseProp = kebabCaseProp;
+ }
+ public static @java.lang.SuppressWarnings("all") JacksonJsonPropertyBuilder builder() {
+ return new JacksonJsonPropertyBuilder();
+ }
+ public @JsonProperty("kebab-case-prop") @java.lang.SuppressWarnings("all") void setKebabCaseProp(final String kebabCaseProp) {
+ this.kebabCaseProp = kebabCaseProp;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java b/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java
index 4b5cb188..616d7083 100644
--- a/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java
+++ b/test/transform/resource/after-ecj/SuperBuilderWithNonNull.java
@@ -10,6 +10,10 @@ public class SuperBuilderWithNonNull {
protected abstract @java.lang.SuppressWarnings("all") B self();
public abstract @java.lang.SuppressWarnings("all") C build();
public @java.lang.SuppressWarnings("all") B nonNullParentField(final @lombok.NonNull String nonNullParentField) {
+ if ((nonNullParentField == null))
+ {
+ throw new java.lang.NullPointerException("nonNullParentField is marked non-null but is null");
+ }
this.nonNullParentField = nonNullParentField;
nonNullParentField$set = true;
return self();
@@ -57,6 +61,10 @@ public class SuperBuilderWithNonNull {
protected abstract @java.lang.Override @java.lang.SuppressWarnings("all") B self();
public abstract @java.lang.Override @java.lang.SuppressWarnings("all") C build();
public @java.lang.SuppressWarnings("all") B nonNullChildField(final @lombok.NonNull String nonNullChildField) {
+ if ((nonNullChildField == null))
+ {
+ throw new java.lang.NullPointerException("nonNullChildField is marked non-null but is null");
+ }
this.nonNullChildField = nonNullChildField;
return self();
}
diff --git a/test/transform/resource/before/BuilderWithNonNull.java b/test/transform/resource/before/BuilderWithNonNull.java
new file mode 100644
index 00000000..03a54326
--- /dev/null
+++ b/test/transform/resource/before/BuilderWithNonNull.java
@@ -0,0 +1,5 @@
+@lombok.Builder
+class BuilderWithNonNull {
+ @lombok.NonNull
+ private final String id;
+}
diff --git a/test/transform/resource/before/JacksonJsonProperty.java b/test/transform/resource/before/JacksonJsonProperty.java
new file mode 100644
index 00000000..f002dc48
--- /dev/null
+++ b/test/transform/resource/before/JacksonJsonProperty.java
@@ -0,0 +1,10 @@
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Builder;
+import lombok.Setter;
+
+@Builder
+public class JacksonJsonProperty {
+ @JsonProperty("kebab-case-prop")
+ @Setter
+ public String kebabCaseProp;
+}