aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r--test/transform/resource/after-ecj/ExtensionMethodPlain.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/transform/resource/after-ecj/ExtensionMethodPlain.java b/test/transform/resource/after-ecj/ExtensionMethodPlain.java
new file mode 100644
index 00000000..6e719853
--- /dev/null
+++ b/test/transform/resource/after-ecj/ExtensionMethodPlain.java
@@ -0,0 +1,25 @@
+import lombok.experimental.ExtensionMethod;
+@ExtensionMethod({java.util.Arrays.class, ExtensionMethodPlain.Extensions.class}) class ExtensionMethodPlain {
+ static class Extensions {
+ Extensions() {
+ super();
+ }
+ public static <T>T or(T obj, T ifNull) {
+ return ((obj != null) ? obj : ifNull);
+ }
+ public static String toTitleCase(String in) {
+ if (in.isEmpty())
+ return in;
+ return (("" + Character.toTitleCase(in.charAt(0))) + in.substring(1).toLowerCase());
+ }
+ }
+ ExtensionMethodPlain() {
+ super();
+ }
+ public String test() {
+ int[] intArray = {5, 3, 8, 2};
+ java.util.Arrays.sort(intArray);
+ String iAmNull = null;
+ return ExtensionMethodPlain.Extensions.or(iAmNull, ExtensionMethodPlain.Extensions.toTitleCase("hELlO, WORlD!"));
+ }
+} \ No newline at end of file