From e5574133363c8b718329e07a73bf161416485da5 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Thu, 6 Feb 2014 23:30:32 +0100 Subject: [configuration] Added the configuration keys lombok.ToString.doNotUseGetters and lombok.ToString.includeFieldNames --- .../after-delombok/ToStringConfiguration.java | 32 ++++++++++++++++++++ .../resource/after-ecj/ToStringConfiguration.java | 35 ++++++++++++++++++++++ .../resource/before/ToStringConfiguration.java | 13 ++++++++ 3 files changed, 80 insertions(+) create mode 100644 test/transform/resource/after-delombok/ToStringConfiguration.java create mode 100644 test/transform/resource/after-ecj/ToStringConfiguration.java create mode 100644 test/transform/resource/before/ToStringConfiguration.java (limited to 'test/transform/resource') diff --git a/test/transform/resource/after-delombok/ToStringConfiguration.java b/test/transform/resource/after-delombok/ToStringConfiguration.java new file mode 100644 index 00000000..035ecdb2 --- /dev/null +++ b/test/transform/resource/after-delombok/ToStringConfiguration.java @@ -0,0 +1,32 @@ +class ToStringConfiguration { + int x; + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "ToStringConfiguration(" + this.x + ")"; + } + @java.lang.SuppressWarnings("all") + public int getX() { + return this.x; + } +} +class ToStringConfiguration2 { + int x; + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "ToStringConfiguration2(x=" + this.x + ")"; + } +} +class ToStringConfiguration3 { + int x; + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "ToStringConfiguration3(" + this.getX() + ")"; + } + @java.lang.SuppressWarnings("all") + public int getX() { + return this.x; + } +} \ No newline at end of file diff --git a/test/transform/resource/after-ecj/ToStringConfiguration.java b/test/transform/resource/after-ecj/ToStringConfiguration.java new file mode 100644 index 00000000..8bb99146 --- /dev/null +++ b/test/transform/resource/after-ecj/ToStringConfiguration.java @@ -0,0 +1,35 @@ +import lombok.ToString; +import lombok.Getter; +@ToString @Getter class ToStringConfiguration { + int x; + ToStringConfiguration() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("ToStringConfiguration(" + this.x) + ")"); + } + public @java.lang.SuppressWarnings("all") int getX() { + return this.x; + } +} +@ToString(includeFieldNames = true) class ToStringConfiguration2 { + int x; + ToStringConfiguration2() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("ToStringConfiguration2(x=" + this.x) + ")"); + } +} +@ToString(doNotUseGetters = false) @Getter class ToStringConfiguration3 { + int x; + ToStringConfiguration3() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("ToStringConfiguration3(" + this.getX()) + ")"); + } + public @java.lang.SuppressWarnings("all") int getX() { + return this.x; + } +} \ No newline at end of file diff --git a/test/transform/resource/before/ToStringConfiguration.java b/test/transform/resource/before/ToStringConfiguration.java new file mode 100644 index 00000000..7630cda5 --- /dev/null +++ b/test/transform/resource/before/ToStringConfiguration.java @@ -0,0 +1,13 @@ +//CONF: lombok.ToString.includeFieldNames = false +//CONF: lombok.ToString.doNotUseGetters = true +import lombok.ToString; +import lombok.Getter; +@ToString @Getter class ToStringConfiguration { + int x; +} +@ToString(includeFieldNames=true) class ToStringConfiguration2 { + int x; +} +@ToString(doNotUseGetters=false) @Getter class ToStringConfiguration3 { + int x; +} -- cgit