aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-05-07 00:08:49 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2019-05-07 00:08:49 +0200
commit42f36e66fec9554205ed7caaab33c1c7be0db90b (patch)
treea0b1034dbbec38cc2326ae32741dafe5e3efba4b /test/transform/resource
parente69a991fcb141fb24de8afb433c753d35821b1c3 (diff)
downloadlombok-42f36e66fec9554205ed7caaab33c1c7be0db90b.tar.gz
lombok-42f36e66fec9554205ed7caaab33c1c7be0db90b.tar.bz2
lombok-42f36e66fec9554205ed7caaab33c1c7be0db90b.zip
[fixes #1981][fixes #1961] Hardcoded some knowledge about how to copy jackson’s `@JsonProperty`.
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/JacksonJsonProperty.java41
-rw-r--r--test/transform/resource/after-ecj/JacksonJsonProperty.java32
-rw-r--r--test/transform/resource/before/JacksonJsonProperty.java10
3 files changed, 83 insertions, 0 deletions
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/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/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;
+}