aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2013-11-19 21:02:59 +0100
committerRoel Spilker <r.spilker@gmail.com>2013-11-19 21:02:59 +0100
commit78b2d6919e35887940f9f11b6ae1731245739b83 (patch)
tree0dc305883c19a862a38669374c5614e26480d4b8 /test/transform/resource/before
parent5deb185591904d275cb06eea85c0d739587fc738 (diff)
parent83b7e77b0cce6cd5993b17f36164271accdd281c (diff)
downloadlombok-78b2d6919e35887940f9f11b6ae1731245739b83.tar.gz
lombok-78b2d6919e35887940f9f11b6ae1731245739b83.tar.bz2
lombok-78b2d6919e35887940f9f11b6ae1731245739b83.zip
Merge branch 'master' of github.com:rzwitserloot/lombok
Conflicts: src/delombok/lombok/delombok/DelombokApp.java
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/BuilderWithAccessors.java7
-rw-r--r--test/transform/resource/before/Constructors.java2
-rw-r--r--test/transform/resource/before/ConstructorsWithAccessors.java6
-rw-r--r--test/transform/resource/before/GetterOnMethod.java4
-rw-r--r--test/transform/resource/before/GetterOnMethodErrors.java2
-rw-r--r--test/transform/resource/before/GetterOnMethodErrors2.java14
-rw-r--r--test/transform/resource/before/GetterSetterJavadoc.java12
-rw-r--r--test/transform/resource/before/NonNullOnParameterAbstract.java7
-rw-r--r--test/transform/resource/before/NonNullWithSneakyThrows.java5
-rw-r--r--test/transform/resource/before/SetterOnMethodOnParam.java4
-rw-r--r--test/transform/resource/before/TestOperators.java48
11 files changed, 92 insertions, 19 deletions
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/Constructors.java b/test/transform/resource/before/Constructors.java
index 0ab7b7f0..45b3a199 100644
--- a/test/transform/resource/before/Constructors.java
+++ b/test/transform/resource/before/Constructors.java
@@ -10,7 +10,7 @@
final int x;
String name;
}
-@lombok.RequiredArgsConstructor(onConstructor=@_(@Deprecated)) class RequiredArgsConstructorWithAnnotations {
+@lombok.RequiredArgsConstructor(onConstructor=@__(@Deprecated)) class RequiredArgsConstructorWithAnnotations {
final int x;
String name;
}
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;
+}
diff --git a/test/transform/resource/before/GetterOnMethod.java b/test/transform/resource/before/GetterOnMethod.java
index 558f3f64..3e56a66e 100644
--- a/test/transform/resource/before/GetterOnMethod.java
+++ b/test/transform/resource/before/GetterOnMethod.java
@@ -1,6 +1,6 @@
class GetterOnMethod {
- @lombok.Getter(onMethod=@_(@Deprecated)) int i;
- @lombok.Getter(onMethod=@_({@java.lang.Deprecated, @Test})) int j, k;
+ @lombok.Getter(onMethod=@__(@Deprecated)) int i;
+ @lombok.Getter(onMethod=@__({@java.lang.Deprecated, @Test})) int j, k;
public @interface Test {
}
diff --git a/test/transform/resource/before/GetterOnMethodErrors.java b/test/transform/resource/before/GetterOnMethodErrors.java
index ae5d5b54..ec4704f0 100644
--- a/test/transform/resource/before/GetterOnMethodErrors.java
+++ b/test/transform/resource/before/GetterOnMethodErrors.java
@@ -1,6 +1,6 @@
class PlaceFillerToMakeSurePositionIsRelevant {
}
-@lombok.Getter(onMethod=@_(@Deprecated))
+@lombok.Getter(onMethod=@__(@Deprecated))
class GetterOnMethodErrors {
private int test;
}
diff --git a/test/transform/resource/before/GetterOnMethodErrors2.java b/test/transform/resource/before/GetterOnMethodErrors2.java
index 423183b9..2fd98c83 100644
--- a/test/transform/resource/before/GetterOnMethodErrors2.java
+++ b/test/transform/resource/before/GetterOnMethodErrors2.java
@@ -1,12 +1,12 @@
class GetterOnMethodErrors2 {
@lombok.Getter(onMethod=@_A_(@Deprecated)) private int bad1;
- @lombok.Getter(onMethod=@_(5)) private int bad2;
- @lombok.Getter(onMethod=@_({@Deprecated, 5})) private int bad3;
- @lombok.Getter(onMethod=@_(bar=@Deprecated)) private int bad4;
- @lombok.Getter(onMethod=@_) private int good1;
- @lombok.Getter(onMethod=@_()) private int good2;
- @lombok.Getter(onMethod=@_(value=@Deprecated)) private int good3;
- @lombok.Getter(onMethod=@_(value={@Deprecated, @Test})) private int good4;
+ @lombok.Getter(onMethod=@__(5)) private int bad2;
+ @lombok.Getter(onMethod=@__({@Deprecated, 5})) private int bad3;
+ @lombok.Getter(onMethod=@$(bar=@Deprecated)) private int bad4;
+ @lombok.Getter(onMethod=@__) private int good1;
+ @lombok.Getter(onMethod=@X()) private int good2;
+ @lombok.Getter(onMethod=@__(value=@Deprecated)) private int good3;
+ @lombok.Getter(onMethod=@xXx$$(value={@Deprecated, @Test})) private int good4;
public @interface Test {
}
}
diff --git a/test/transform/resource/before/GetterSetterJavadoc.java b/test/transform/resource/before/GetterSetterJavadoc.java
index e3ae0aac..0dc64092 100644
--- a/test/transform/resource/before/GetterSetterJavadoc.java
+++ b/test/transform/resource/before/GetterSetterJavadoc.java
@@ -3,11 +3,11 @@ class GetterSetterJavadoc1 {
/**
* Some text
*
- * @param fieldName Hello, World
+ * @param fieldName Hello, World1
* --- GETTER ---
* Getter section
*
- * @return Sky is blue
+ * @return Sky is blue1
*/
private int fieldName;
}
@@ -16,8 +16,8 @@ class GetterSetterJavadoc2 {
/**
* Some text
*
- * @param fieldName Hello, World
- * @return Sky is blue
+ * @param fieldName Hello, World2
+ * @return Sky is blue2
*/
@lombok.Getter @lombok.Setter private int fieldName;
}
@@ -28,10 +28,10 @@ class GetterSetterJavadoc3 {
*
* **SETTER**
* Setter section
- * @param fieldName Hello, World
+ * @param fieldName Hello, World3
* **GETTER**
* Getter section
- * @return Sky is blue
+ * @return Sky is blue3
*/
@lombok.Getter @lombok.Setter private int fieldName;
}
diff --git a/test/transform/resource/before/NonNullOnParameterAbstract.java b/test/transform/resource/before/NonNullOnParameterAbstract.java
new file mode 100644
index 00000000..16691184
--- /dev/null
+++ b/test/transform/resource/before/NonNullOnParameterAbstract.java
@@ -0,0 +1,7 @@
+abstract class NonNullOnParameterAbstract {
+ public void test(@lombok.NonNull String 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/before/NonNullWithSneakyThrows.java b/test/transform/resource/before/NonNullWithSneakyThrows.java
new file mode 100644
index 00000000..35f78a7f
--- /dev/null
+++ b/test/transform/resource/before/NonNullWithSneakyThrows.java
@@ -0,0 +1,5 @@
+class NonNullWithSneakyThrows {
+ @lombok.SneakyThrows void test(@lombok.NonNull String in) {
+ System.out.println(in);
+ }
+}
diff --git a/test/transform/resource/before/SetterOnMethodOnParam.java b/test/transform/resource/before/SetterOnMethodOnParam.java
index 70f3dc8c..4e042cf4 100644
--- a/test/transform/resource/before/SetterOnMethodOnParam.java
+++ b/test/transform/resource/before/SetterOnMethodOnParam.java
@@ -1,6 +1,6 @@
class SetterOnMethodOnParam {
- @lombok.Setter(onMethod=@_(@Deprecated)) int i;
- @lombok.Setter(onMethod=@_({@java.lang.Deprecated, @Test}), onParam=@_(@Test)) int j, k;
+ @lombok.Setter(onMethod=@__(@Deprecated)) int i;
+ @lombok.Setter(onMethod=@__({@java.lang.Deprecated, @Test}), onParam=@__(@Test)) int j, k;
public @interface Test {
}
diff --git a/test/transform/resource/before/TestOperators.java b/test/transform/resource/before/TestOperators.java
new file mode 100644
index 00000000..566bedfc
--- /dev/null
+++ b/test/transform/resource/before/TestOperators.java
@@ -0,0 +1,48 @@
+class TestOperators {
+ int x = 10;
+ 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;
+ }
+}