aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/InjectField.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/before/InjectField.java')
-rw-r--r--test/transform/resource/before/InjectField.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/test/transform/resource/before/InjectField.java b/test/transform/resource/before/InjectField.java
new file mode 100644
index 00000000..e81cbc5a
--- /dev/null
+++ b/test/transform/resource/before/InjectField.java
@@ -0,0 +1,50 @@
+import java.util.logging.Level;
+import lombok.extern.java.Log;
+import lombok.Synchronized;
+
+@Log
+enum InjectField1 {
+ A,
+ B;
+
+ private static final String LOG_MESSAGE = "static initializer";
+
+ private String fieldA;
+
+ static {
+ log.log(Level.FINE, LOG_MESSAGE);
+ }
+
+ private String fieldB;
+
+ @Synchronized
+ void generateLockField() {
+ System.out.println("lock field");
+ }
+
+ @Synchronized
+ static void generateStaticLockField() {
+ System.out.println("static lock field");
+ }
+}
+
+@Log
+class InjectField2 {
+ private static final String LOG_MESSAGE = "static initializer";
+
+ static {
+ log.log(Level.FINE, LOG_MESSAGE);
+ }
+
+ @Synchronized
+ void generateLockField() {
+ System.out.println("lock field");
+ }
+}
+
+@Log
+class InjectField3 {
+ static {
+ log.log(Level.FINE, "static initializer");
+ }
+} \ No newline at end of file