From ad21a1573bab57c63ffd5b9867f8e19ac7f0c94b Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 23 Apr 2018 23:43:15 +0200 Subject: [annotation based ToString] hey.. we have annotation based ToString now, where you can include/exclude fields by annotating the fields. --- .../resource/after-ecj/ToStringNewStyle.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/transform/resource/after-ecj/ToStringNewStyle.java (limited to 'test/transform/resource/after-ecj') diff --git a/test/transform/resource/after-ecj/ToStringNewStyle.java b/test/transform/resource/after-ecj/ToStringNewStyle.java new file mode 100644 index 00000000..cdc6f5bc --- /dev/null +++ b/test/transform/resource/after-ecj/ToStringNewStyle.java @@ -0,0 +1,20 @@ +import lombok.ToString; +public @ToString class ToStringNewStyle { + @ToString.Include(name = "a") int b; + double c; + int f; + @ToString.Include(name = "e") int d; + int g; + @ToString.Include(rank = (- 1)) int h; + int i; + @ToString.Exclude int j; + public ToStringNewStyle() { + super(); + } + @ToString.Include int f() { + return 0; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((((((((((("ToStringNewStyle(a=" + this.b) + ", c=") + this.c) + ", e=") + this.d) + ", f=") + this.f()) + ", g=") + this.g) + ", i=") + this.i) + ", h=") + this.h) + ")"); + } +} -- cgit