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/InjectField.java63
-rw-r--r--test/transform/resource/after-ecj/LoggerSlf4jTypes.java2
2 files changed, 64 insertions, 1 deletions
diff --git a/test/transform/resource/after-ecj/InjectField.java b/test/transform/resource/after-ecj/InjectField.java
new file mode 100644
index 00000000..83d9e5fa
--- /dev/null
+++ b/test/transform/resource/after-ecj/InjectField.java
@@ -0,0 +1,63 @@
+import java.util.logging.Level;
+import lombok.extern.java.Log;
+import lombok.Synchronized;
+@Log enum InjectField1 {
+ A(),
+ B(),
+ 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 {
+ log.log(Level.FINE, LOG_MESSAGE);
+ }
+ private String fieldB;
+ <clinit>() {
+ }
+ InjectField1() {
+ super();
+ }
+ @Synchronized void generateLockField() {
+ synchronized (this.$lock)
+ {
+ System.out.println("lock field");
+ }
+ }
+ static @Synchronized void generateStaticLockField() {
+ synchronized (InjectField1.$LOCK)
+ {
+ System.out.println("static lock field");
+ }
+ }
+}
+@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 static final String LOG_MESSAGE = "static initializer";
+ static {
+ log.log(Level.FINE, LOG_MESSAGE);
+ }
+ <clinit>() {
+ }
+ InjectField2() {
+ super();
+ }
+ @Synchronized void generateLockField() {
+ synchronized (this.$lock)
+ {
+ System.out.println("lock field");
+ }
+ }
+}
+@Log class InjectField3 {
+ private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(InjectField3.class.getName());
+ static {
+ log.log(Level.FINE, "static initializer");
+ }
+ <clinit>() {
+ }
+ InjectField3() {
+ super();
+ }
+}
diff --git a/test/transform/resource/after-ecj/LoggerSlf4jTypes.java b/test/transform/resource/after-ecj/LoggerSlf4jTypes.java
index faa77cd7..95ed1ebf 100644
--- a/test/transform/resource/after-ecj/LoggerSlf4jTypes.java
+++ b/test/transform/resource/after-ecj/LoggerSlf4jTypes.java
@@ -11,8 +11,8 @@
}
}
@lombok.extern.slf4j.Slf4j enum LoggerSlf4jTypesEnumWithElement {
- private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jTypesEnumWithElement.class);
FOO(),
+ private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggerSlf4jTypesEnumWithElement.class);
<clinit>() {
}
LoggerSlf4jTypesEnumWithElement() {