diff options
author | Adam Juraszek <Adam.Juraszek@ataccama.com> | 2019-05-14 11:57:21 +0200 |
---|---|---|
committer | Adam Juraszek <Adam.Juraszek@ataccama.com> | 2019-05-14 18:48:01 +0200 |
commit | bb66465751b8f0b129e53e639854f95fcdb3dca8 (patch) | |
tree | 490aa5d2b452b012fea1cc0f42b575b76604808d /test/transform/resource | |
parent | 399c516bd3a7d08830710e6eb1283897754805fd (diff) | |
download | lombok-bb66465751b8f0b129e53e639854f95fcdb3dca8.tar.gz lombok-bb66465751b8f0b129e53e639854f95fcdb3dca8.tar.bz2 lombok-bb66465751b8f0b129e53e639854f95fcdb3dca8.zip |
Custom log declaration
Diffstat (limited to 'test/transform/resource')
10 files changed, 135 insertions, 2 deletions
diff --git a/test/transform/resource/after-delombok/LoggerCustom.java b/test/transform/resource/after-delombok/LoggerCustom.java new file mode 100644 index 00000000..4a33e8a9 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerCustom.java @@ -0,0 +1,13 @@ +class LoggerCustomLog { + @java.lang.SuppressWarnings("all") + private static final MyLogger log = MyLoggerFactory.create(LoggerCustomLog.class); +} + +class MyLoggerFactory { + static MyLogger create(Class<?> clazz) { + return null; + } +} + +class MyLogger { +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerCustomWithPackage.java b/test/transform/resource/after-delombok/LoggerCustomWithPackage.java new file mode 100644 index 00000000..45e741c2 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerCustomWithPackage.java @@ -0,0 +1,14 @@ +package before; +class LoggerCustomLog { + @java.lang.SuppressWarnings("all") + private static final before.MyLogger log = before.MyLoggerFactory.create(LoggerCustomLog.class); +} + +class MyLoggerFactory { + static MyLogger create(Class<?> clazz) { + return null; + } +} + +class MyLogger { +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerCustomWithTopicAndName.java b/test/transform/resource/after-delombok/LoggerCustomWithTopicAndName.java new file mode 100644 index 00000000..abb785b9 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerCustomWithTopicAndName.java @@ -0,0 +1,10 @@ +class LoggerCustomLog { + @java.lang.SuppressWarnings("all") + private static final MyLoggerFactory log = MyLoggerFactory.create(LoggerCustomLog.class.getName(), "t", null, LoggerCustomLog.class, "t"); +} + +class MyLoggerFactory { + static MyLoggerFactory create(String name, String t1, Object o, Class<?> clazz, String t2) { + return null; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerCustom.java b/test/transform/resource/after-ecj/LoggerCustom.java new file mode 100644 index 00000000..2f60b7b6 --- /dev/null +++ b/test/transform/resource/after-ecj/LoggerCustom.java @@ -0,0 +1,21 @@ +@lombok.CustomLog class LoggerCustomLog { + private static final MyLogger log = MyLoggerFactory.create(LoggerCustomLog.class); + <clinit>() { + } + LoggerCustomLog() { + super(); + } +} +class MyLoggerFactory { + MyLoggerFactory() { + super(); + } + static MyLogger create(Class<?> clazz) { + return null; + } +} +class MyLogger { + MyLogger() { + super(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerCustomWithPackage.java b/test/transform/resource/after-ecj/LoggerCustomWithPackage.java new file mode 100644 index 00000000..d1bc1704 --- /dev/null +++ b/test/transform/resource/after-ecj/LoggerCustomWithPackage.java @@ -0,0 +1,22 @@ +package before; +@lombok.CustomLog class LoggerCustomLog { + private static final before.MyLogger log = before.MyLoggerFactory.create(LoggerCustomLog.class); + <clinit>() { + } + LoggerCustomLog() { + super(); + } +} +class MyLoggerFactory { + MyLoggerFactory() { + super(); + } + static MyLogger create(Class<?> clazz) { + return null; + } +} +class MyLogger { + MyLogger() { + super(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/LoggerCustomWithTopicAndName.java b/test/transform/resource/after-ecj/LoggerCustomWithTopicAndName.java new file mode 100644 index 00000000..91cf6d8d --- /dev/null +++ b/test/transform/resource/after-ecj/LoggerCustomWithTopicAndName.java @@ -0,0 +1,16 @@ +@lombok.CustomLog(topic = "t") class LoggerCustomLog { + private static final MyLoggerFactory log = MyLoggerFactory.create(LoggerCustomLog.class.getName(), "t", null, LoggerCustomLog.class, "t"); + <clinit>() { + } + LoggerCustomLog() { + super(); + } +} +class MyLoggerFactory { + MyLoggerFactory() { + super(); + } + static MyLoggerFactory create(String name, String t1, Object o, Class<?> clazz, String t2) { + return null; + } +} diff --git a/test/transform/resource/before/LoggerCustom.java b/test/transform/resource/before/LoggerCustom.java new file mode 100644 index 00000000..c0435a29 --- /dev/null +++ b/test/transform/resource/before/LoggerCustom.java @@ -0,0 +1,13 @@ +//CONF: lombok.log.custom.declaration = MyLogger MyLoggerFactory.create(TYPE) +@lombok.CustomLog +class LoggerCustomLog { +} + +class MyLoggerFactory { + static MyLogger create(Class<?> clazz) { + return null; + } +} + +class MyLogger { +}
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerCustomWithPackage.java b/test/transform/resource/before/LoggerCustomWithPackage.java new file mode 100644 index 00000000..77c4498d --- /dev/null +++ b/test/transform/resource/before/LoggerCustomWithPackage.java @@ -0,0 +1,14 @@ +//CONF: lombok.log.custom.declaration = before.MyLogger before.MyLoggerFactory.create(TYPE) +package before; +@lombok.CustomLog +class LoggerCustomLog { +} + +class MyLoggerFactory { + static MyLogger create(Class<?> clazz) { + return null; + } +} + +class MyLogger { +}
\ No newline at end of file diff --git a/test/transform/resource/before/LoggerCustomWithTopicAndName.java b/test/transform/resource/before/LoggerCustomWithTopicAndName.java new file mode 100644 index 00000000..b40ed86a --- /dev/null +++ b/test/transform/resource/before/LoggerCustomWithTopicAndName.java @@ -0,0 +1,10 @@ +//CONF: lombok.log.custom.declaration = MyLoggerFactory.create(NAME,TOPIC,NULL,TYPE,TOPIC) +@lombok.CustomLog(topic="t") +class LoggerCustomLog { +} + +class MyLoggerFactory { + static MyLoggerFactory create(String name, String t1, Object o, Class<?> clazz, String t2) { + return null; + } +} diff --git a/test/transform/resource/messages-delombok/LoggerSlf4jTypes.java.messages b/test/transform/resource/messages-delombok/LoggerSlf4jTypes.java.messages index 08f6bb7b..9910685c 100644 --- a/test/transform/resource/messages-delombok/LoggerSlf4jTypes.java.messages +++ b/test/transform/resource/messages-delombok/LoggerSlf4jTypes.java.messages @@ -1,2 +1,2 @@ -1 @Log is legal only on classes and enums. -4 @Log is legal only on classes and enums.
\ No newline at end of file +1 @Slf4j is legal only on classes and enums. +4 @Slf4j is legal only on classes and enums.
\ No newline at end of file |