diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-08-14 07:05:31 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-08-14 07:05:43 +0200 |
commit | b93318da303b36957f3774015090121af778665f (patch) | |
tree | edf3678993970ff99f69d13a1f30ad3ae48e40c9 /test | |
parent | 613d7e9e0cc14e9f789e81b52d72dbef24aff2e9 (diff) | |
download | lombok-b93318da303b36957f3774015090121af778665f.tar.gz lombok-b93318da303b36957f3774015090121af778665f.tar.bz2 lombok-b93318da303b36957f3774015090121af778665f.zip |
* Fixed 553: @XArgsConstructor (and @Builder on a class) did not look at @Accessors to handle field accessors.
* various operations on names in javac were really slow; they are faster now.
Diffstat (limited to 'test')
6 files changed, 153 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/BuilderWithAccessors.java b/test/transform/resource/after-delombok/BuilderWithAccessors.java new file mode 100644 index 00000000..503c33be --- /dev/null +++ b/test/transform/resource/after-delombok/BuilderWithAccessors.java @@ -0,0 +1,65 @@ +class BuilderWithAccessors { + private final int plower; + private final int pUpper; + private int _foo; + private int __bar; + @java.lang.SuppressWarnings("all") + BuilderWithAccessors(final int plower, final int upper, final int foo, final int _bar) { + this.plower = plower; + this.pUpper = upper; + this._foo = foo; + this.__bar = _bar; + } + @java.lang.SuppressWarnings("all") + public static class BuilderWithAccessorsBuilder { + private int plower; + private int upper; + private int foo; + private int _bar; + + @java.lang.SuppressWarnings("all") + BuilderWithAccessorsBuilder() { + + } + + @java.lang.SuppressWarnings("all") + public BuilderWithAccessorsBuilder plower(final int plower) { + this.plower = plower; + return this; + } + + @java.lang.SuppressWarnings("all") + public BuilderWithAccessorsBuilder upper(final int upper) { + this.upper = upper; + return this; + } + + @java.lang.SuppressWarnings("all") + public BuilderWithAccessorsBuilder foo(final int foo) { + this.foo = foo; + return this; + } + + @java.lang.SuppressWarnings("all") + public BuilderWithAccessorsBuilder _bar(final int _bar) { + this._bar = _bar; + return this; + } + + @java.lang.SuppressWarnings("all") + public BuilderWithAccessors build() { + return new BuilderWithAccessors(plower, upper, foo, _bar); + } + + @java.lang.Override + @java.lang.SuppressWarnings("all") + public java.lang.String toString() { + return "BuilderWithAccessors.BuilderWithAccessorsBuilder(plower=" + this.plower + ", upper=" + this.upper + ", foo=" + this.foo + ", _bar=" + this._bar + ")"; + } + } + + @java.lang.SuppressWarnings("all") + public static BuilderWithAccessorsBuilder builder() { + return new BuilderWithAccessorsBuilder(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/ConstructorsWithAccessors.java b/test/transform/resource/after-delombok/ConstructorsWithAccessors.java new file mode 100644 index 00000000..9937c7ee --- /dev/null +++ b/test/transform/resource/after-delombok/ConstructorsWithAccessors.java @@ -0,0 +1,15 @@ +class ConstructorsWithAccessors { + int plower; + int pUpper; + int _huh; + int __huh2; + + @java.beans.ConstructorProperties({"plower", "upper", "huh", "_huh2"}) + @java.lang.SuppressWarnings("all") + public ConstructorsWithAccessors(final int plower, final int upper, final int huh, final int _huh2) { + this.plower = plower; + this.pUpper = upper; + this._huh = huh; + this.__huh2 = _huh2; + } +} diff --git a/test/transform/resource/after-ecj/BuilderWithAccessors.java b/test/transform/resource/after-ecj/BuilderWithAccessors.java new file mode 100644 index 00000000..79776dc4 --- /dev/null +++ b/test/transform/resource/after-ecj/BuilderWithAccessors.java @@ -0,0 +1,47 @@ +@lombok.experimental.Builder @lombok.experimental.Accessors(prefix = {"p", "_"}) class BuilderWithAccessors { + public static @java.lang.SuppressWarnings("all") class BuilderWithAccessorsBuilder { + private int plower; + private int upper; + private int foo; + private int _bar; + @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder() { + super(); + } + public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder plower(final int plower) { + this.plower = plower; + return this; + } + public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder upper(final int upper) { + this.upper = upper; + return this; + } + public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder foo(final int foo) { + this.foo = foo; + return this; + } + public @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder _bar(final int _bar) { + this._bar = _bar; + return this; + } + public @java.lang.SuppressWarnings("all") BuilderWithAccessors build() { + return new BuilderWithAccessors(plower, upper, foo, _bar); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((((((("BuilderWithAccessors.BuilderWithAccessorsBuilder(plower=" + this.plower) + ", upper=") + this.upper) + ", foo=") + this.foo) + ", _bar=") + this._bar) + ")"); + } + } + private final int plower; + private final int pUpper; + private int _foo; + private int __bar; + @java.lang.SuppressWarnings("all") BuilderWithAccessors(final int plower, final int upper, final int foo, final int _bar) { + super(); + this.plower = plower; + this.pUpper = upper; + this._foo = foo; + this.__bar = _bar; + } + public static @java.lang.SuppressWarnings("all") BuilderWithAccessorsBuilder builder() { + return new BuilderWithAccessorsBuilder(); + } +} diff --git a/test/transform/resource/after-ecj/ConstructorsWithAccessors.java b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java new file mode 100644 index 00000000..0df8fbe1 --- /dev/null +++ b/test/transform/resource/after-ecj/ConstructorsWithAccessors.java @@ -0,0 +1,13 @@ +@lombok.AllArgsConstructor @lombok.experimental.Accessors(prefix = {"p", "_"}) class ConstructorsWithAccessors { + int plower; + int pUpper; + int _huh; + int __huh2; + public @java.beans.ConstructorProperties({"plower", "upper", "huh", "_huh2"}) @java.lang.SuppressWarnings("all") ConstructorsWithAccessors(final int plower, final int upper, final int huh, final int _huh2) { + super(); + this.plower = plower; + this.pUpper = upper; + this._huh = huh; + this.__huh2 = _huh2; + } +} diff --git a/test/transform/resource/before/BuilderWithAccessors.java b/test/transform/resource/before/BuilderWithAccessors.java new file mode 100644 index 00000000..4f5660a1 --- /dev/null +++ b/test/transform/resource/before/BuilderWithAccessors.java @@ -0,0 +1,7 @@ +@lombok.experimental.Builder @lombok.experimental.Accessors(prefix={"p", "_"}) +class BuilderWithAccessors { + private final int plower; + private final int pUpper; + private int _foo; + private int __bar; +} diff --git a/test/transform/resource/before/ConstructorsWithAccessors.java b/test/transform/resource/before/ConstructorsWithAccessors.java new file mode 100644 index 00000000..d242317d --- /dev/null +++ b/test/transform/resource/before/ConstructorsWithAccessors.java @@ -0,0 +1,6 @@ +@lombok.AllArgsConstructor @lombok.experimental.Accessors(prefix={"p", "_"}) class ConstructorsWithAccessors { + int plower; + int pUpper; + int _huh; + int __huh2; +} |