diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
6 files changed, 144 insertions, 2 deletions
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/after-ecj/InjectField.java b/test/transform/resource/after-ecj/InjectField.java index 83d9e5fa..f9ea9142 100644 --- a/test/transform/resource/after-ecj/InjectField.java +++ b/test/transform/resource/after-ecj/InjectField.java @@ -4,9 +4,9 @@ import lombok.Synchronized; @Log enum InjectField1 { A(), B(), + private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField1.class.getName()); private final java.lang.Object $lock = new java.lang.Object[0]; private static final java.lang.Object $LOCK = new java.lang.Object[0]; - private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField1.class.getName()); private static final String LOG_MESSAGE = "static initializer"; private String fieldA; static { @@ -32,8 +32,8 @@ import lombok.Synchronized; } } @Log class InjectField2 { - private final java.lang.Object $lock = new java.lang.Object[0]; private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField2.class.getName()); + private final java.lang.Object $lock = new java.lang.Object[0]; private static final String LOG_MESSAGE = "static initializer"; static { log.log(Level.FINE, LOG_MESSAGE); diff --git a/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java new file mode 100644 index 00000000..a7dae247 --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullOnParameterAbstract.java @@ -0,0 +1,13 @@ +abstract class NonNullOnParameterAbstract { + NonNullOnParameterAbstract() { + super(); + } + public void test(@lombok.NonNull String arg) { + if ((arg == null)) + { + throw new java.lang.NullPointerException("arg"); + } + System.out.println("Hey"); + } + public abstract void test2(@lombok.NonNull String arg); +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java new file mode 100644 index 00000000..fac8dcdd --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullWithSneakyThrows.java @@ -0,0 +1,18 @@ +class NonNullWithSneakyThrows { + NonNullWithSneakyThrows() { + super(); + } + @lombok.SneakyThrows void test(@lombok.NonNull String in) { + try + { + if ((in == null)) + { + throw new java.lang.NullPointerException("in"); + } + System.out.println(in); + } + catch (final java.lang.Throwable $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/TestOperators.java b/test/transform/resource/after-ecj/TestOperators.java new file mode 100644 index 00000000..8a78ceeb --- /dev/null +++ b/test/transform/resource/after-ecj/TestOperators.java @@ -0,0 +1,51 @@ +class TestOperators { + int x = 10; + TestOperators() { + super(); + } + public void test() { + x = 12; + int a = (+ x); + boolean d = true; + boolean e = false; + boolean b; + a = (- x); + b = (! d); + a = (~ x); + a = (++ x); + a = (-- x); + a = (x ++); + a = (x --); + b = (d || e); + b = (d && e); + a = (x | a); + a = (x ^ a); + a = (x & a); + b = (a == x); + b = (a != x); + b = (a < x); + b = (a > x); + b = (a <= x); + b = (a >= x); + a = (a << x); + a = (a >> x); + a = (a >>> x); + a = (a + x); + a = (a - x); + a = (a * x); + a = (a / x); + a = (a % x); + a |= x; + a ^= x; + a &= x; + a <<= x; + a >>= x; + a >>>= x; + a += x; + a -= x; + a *= x; + a /= x; + a %= x; + a = ((a > x) ? 1 : 0); + } +} |