aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/AccessorsConfiguration.java26
-rw-r--r--test/transform/resource/after-delombok/LoggerConfig.java4
-rw-r--r--test/transform/resource/after-delombok/ToStringConfiguration.java32
-rw-r--r--test/transform/resource/after-ecj/AccessorsConfiguration.java31
-rw-r--r--test/transform/resource/after-ecj/LoggerConfig.java6
-rw-r--r--test/transform/resource/after-ecj/ToStringConfiguration.java35
-rw-r--r--test/transform/resource/before/AccessorsConfiguration.java20
-rw-r--r--test/transform/resource/before/BuilderInvalidUse.java1
-rw-r--r--test/transform/resource/before/DelegateOnStatic.java1
-rw-r--r--test/transform/resource/before/FlagUsages.java11
-rw-r--r--test/transform/resource/before/LoggerConfig.java5
-rw-r--r--test/transform/resource/before/ToStringConfiguration.java13
-rw-r--r--test/transform/resource/messages-delombok/BuilderInvalidUse.java.messages4
-rw-r--r--test/transform/resource/messages-delombok/DelegateOnStatic.java.messages4
-rw-r--r--test/transform/resource/messages-delombok/FlagUsages.java.messages2
-rw-r--r--test/transform/resource/messages-ecj/BuilderInvalidUse.java.messages4
-rw-r--r--test/transform/resource/messages-ecj/DelegateOnStatic.java.messages4
-rw-r--r--test/transform/resource/messages-ecj/FlagUsages.java.messages2
18 files changed, 197 insertions, 8 deletions
diff --git a/test/transform/resource/after-delombok/AccessorsConfiguration.java b/test/transform/resource/after-delombok/AccessorsConfiguration.java
new file mode 100644
index 00000000..fd60b152
--- /dev/null
+++ b/test/transform/resource/after-delombok/AccessorsConfiguration.java
@@ -0,0 +1,26 @@
+class AccessorsConfiguration {
+ private String m_FieldName = "";
+ @java.lang.SuppressWarnings("all")
+ public String fieldName() {
+ return this.m_FieldName;
+ }
+ @java.lang.SuppressWarnings("all")
+ public void fieldName(final String m_FieldName) {
+ this.m_FieldName = m_FieldName;
+ }
+}
+class AccessorsConfiguration2 {
+ private String m_FieldName = "";
+ @java.lang.SuppressWarnings("all")
+ public void setM_FieldName(final String m_FieldName) {
+ this.m_FieldName = m_FieldName;
+ }
+}
+class AccessorsConfiguration3 {
+ private String fFieldName = "";
+ @java.lang.SuppressWarnings("all")
+ public AccessorsConfiguration3 setFieldName(final String fFieldName) {
+ this.fFieldName = fFieldName;
+ return this;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/LoggerConfig.java b/test/transform/resource/after-delombok/LoggerConfig.java
new file mode 100644
index 00000000..ba955638
--- /dev/null
+++ b/test/transform/resource/after-delombok/LoggerConfig.java
@@ -0,0 +1,4 @@
+class LoggerWithConfig {
+ @java.lang.SuppressWarnings("all")
+ private final org.slf4j.Logger myLogger = org.slf4j.LoggerFactory.getLogger(LoggerWithConfig.class);
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/ToStringConfiguration.java b/test/transform/resource/after-delombok/ToStringConfiguration.java
new file mode 100644
index 00000000..035ecdb2
--- /dev/null
+++ b/test/transform/resource/after-delombok/ToStringConfiguration.java
@@ -0,0 +1,32 @@
+class ToStringConfiguration {
+ int x;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringConfiguration(" + this.x + ")";
+ }
+ @java.lang.SuppressWarnings("all")
+ public int getX() {
+ return this.x;
+ }
+}
+class ToStringConfiguration2 {
+ int x;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringConfiguration2(x=" + this.x + ")";
+ }
+}
+class ToStringConfiguration3 {
+ int x;
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "ToStringConfiguration3(" + this.getX() + ")";
+ }
+ @java.lang.SuppressWarnings("all")
+ public int getX() {
+ return this.x;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/AccessorsConfiguration.java b/test/transform/resource/after-ecj/AccessorsConfiguration.java
new file mode 100644
index 00000000..6678e020
--- /dev/null
+++ b/test/transform/resource/after-ecj/AccessorsConfiguration.java
@@ -0,0 +1,31 @@
+class AccessorsConfiguration {
+ private @lombok.Getter @lombok.Setter @lombok.experimental.Accessors(fluent = true) String m_FieldName = "";
+ AccessorsConfiguration() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") String fieldName() {
+ return this.m_FieldName;
+ }
+ public @java.lang.SuppressWarnings("all") void fieldName(final String m_FieldName) {
+ this.m_FieldName = m_FieldName;
+ }
+}
+@lombok.experimental.Accessors(prefix = {}) class AccessorsConfiguration2 {
+ private @lombok.Setter String m_FieldName = "";
+ AccessorsConfiguration2() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") void setM_FieldName(final String m_FieldName) {
+ this.m_FieldName = m_FieldName;
+ }
+}
+@lombok.experimental.Accessors(chain = true) class AccessorsConfiguration3 {
+ private @lombok.Setter String fFieldName = "";
+ AccessorsConfiguration3() {
+ super();
+ }
+ public @java.lang.SuppressWarnings("all") AccessorsConfiguration3 setFieldName(final String fFieldName) {
+ this.fFieldName = fFieldName;
+ return this;
+ }
+}
diff --git a/test/transform/resource/after-ecj/LoggerConfig.java b/test/transform/resource/after-ecj/LoggerConfig.java
new file mode 100644
index 00000000..907a7167
--- /dev/null
+++ b/test/transform/resource/after-ecj/LoggerConfig.java
@@ -0,0 +1,6 @@
+@lombok.extern.slf4j.Slf4j class LoggerWithConfig {
+ private final org.slf4j.Logger myLogger = org.slf4j.LoggerFactory.getLogger(LoggerWithConfig.class);
+ LoggerWithConfig() {
+ super();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/ToStringConfiguration.java b/test/transform/resource/after-ecj/ToStringConfiguration.java
new file mode 100644
index 00000000..8bb99146
--- /dev/null
+++ b/test/transform/resource/after-ecj/ToStringConfiguration.java
@@ -0,0 +1,35 @@
+import lombok.ToString;
+import lombok.Getter;
+@ToString @Getter class ToStringConfiguration {
+ int x;
+ ToStringConfiguration() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("ToStringConfiguration(" + this.x) + ")");
+ }
+ public @java.lang.SuppressWarnings("all") int getX() {
+ return this.x;
+ }
+}
+@ToString(includeFieldNames = true) class ToStringConfiguration2 {
+ int x;
+ ToStringConfiguration2() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("ToStringConfiguration2(x=" + this.x) + ")");
+ }
+}
+@ToString(doNotUseGetters = false) @Getter class ToStringConfiguration3 {
+ int x;
+ ToStringConfiguration3() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
+ return (("ToStringConfiguration3(" + this.getX()) + ")");
+ }
+ public @java.lang.SuppressWarnings("all") int getX() {
+ return this.x;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/AccessorsConfiguration.java b/test/transform/resource/before/AccessorsConfiguration.java
new file mode 100644
index 00000000..187fd393
--- /dev/null
+++ b/test/transform/resource/before/AccessorsConfiguration.java
@@ -0,0 +1,20 @@
+//CONF: lombok.Accessors.prefix += m_
+//CONF: lombok.Accessors.prefix += f
+//CONF: lombok.Accessors.chain = false
+
+class AccessorsConfiguration {
+ @lombok.Getter @lombok.Setter @lombok.experimental.Accessors(fluent=true)
+ private String m_FieldName = "";
+}
+
+@lombok.experimental.Accessors(prefix = {})
+class AccessorsConfiguration2 {
+ @lombok.Setter
+ private String m_FieldName = "";
+}
+
+@lombok.experimental.Accessors(chain = true)
+class AccessorsConfiguration3 {
+ @lombok.Setter
+ private String fFieldName = "";
+}
diff --git a/test/transform/resource/before/BuilderInvalidUse.java b/test/transform/resource/before/BuilderInvalidUse.java
index 07f37d3d..d7052e1e 100644
--- a/test/transform/resource/before/BuilderInvalidUse.java
+++ b/test/transform/resource/before/BuilderInvalidUse.java
@@ -1,3 +1,4 @@
+//skip compare content
@lombok.experimental.Builder
class BuilderInvalidUse {
private int something;
diff --git a/test/transform/resource/before/DelegateOnStatic.java b/test/transform/resource/before/DelegateOnStatic.java
index ef56ef54..84d99636 100644
--- a/test/transform/resource/before/DelegateOnStatic.java
+++ b/test/transform/resource/before/DelegateOnStatic.java
@@ -1,3 +1,4 @@
+//skip compare content
import lombok.Delegate;
import lombok.Getter;
diff --git a/test/transform/resource/before/FlagUsages.java b/test/transform/resource/before/FlagUsages.java
new file mode 100644
index 00000000..6631224f
--- /dev/null
+++ b/test/transform/resource/before/FlagUsages.java
@@ -0,0 +1,11 @@
+//skip compare content
+//CONF: lombok.Getter.flagUsage = WARNING
+//CONF: lombok.experimental.flagUsage = ERROR
+public class FlagUsages {
+ @lombok.Getter String x;
+
+ @lombok.experimental.Wither String z;
+
+ public FlagUsages(String x, String y) {
+ }
+}
diff --git a/test/transform/resource/before/LoggerConfig.java b/test/transform/resource/before/LoggerConfig.java
new file mode 100644
index 00000000..14195e03
--- /dev/null
+++ b/test/transform/resource/before/LoggerConfig.java
@@ -0,0 +1,5 @@
+//CONF: lombok.log.fieldName = myLogger
+//CONF: lombok.log.fieldIsStatic = false
+@lombok.extern.slf4j.Slf4j
+class LoggerWithConfig {
+}
diff --git a/test/transform/resource/before/ToStringConfiguration.java b/test/transform/resource/before/ToStringConfiguration.java
new file mode 100644
index 00000000..7630cda5
--- /dev/null
+++ b/test/transform/resource/before/ToStringConfiguration.java
@@ -0,0 +1,13 @@
+//CONF: lombok.ToString.includeFieldNames = false
+//CONF: lombok.ToString.doNotUseGetters = true
+import lombok.ToString;
+import lombok.Getter;
+@ToString @Getter class ToStringConfiguration {
+ int x;
+}
+@ToString(includeFieldNames=true) class ToStringConfiguration2 {
+ int x;
+}
+@ToString(doNotUseGetters=false) @Getter class ToStringConfiguration3 {
+ int x;
+}
diff --git a/test/transform/resource/messages-delombok/BuilderInvalidUse.java.messages b/test/transform/resource/messages-delombok/BuilderInvalidUse.java.messages
index a04b4f9b..506a3426 100644
--- a/test/transform/resource/messages-delombok/BuilderInvalidUse.java.messages
+++ b/test/transform/resource/messages-delombok/BuilderInvalidUse.java.messages
@@ -1,2 +1,2 @@
-1 @Getter, @Setter, @Wither, @Data, @ToString, @EqualsAndHashCode, @AllArgsConstructor are not allowed on builder classes.
-12 @Value is not allowed on builder classes. \ No newline at end of file
+2 @Getter, @Setter, @Wither, @Data, @ToString, @EqualsAndHashCode, @AllArgsConstructor are not allowed on builder classes.
+13 @Value is not allowed on builder classes. \ No newline at end of file
diff --git a/test/transform/resource/messages-delombok/DelegateOnStatic.java.messages b/test/transform/resource/messages-delombok/DelegateOnStatic.java.messages
index b807b155..51dcf501 100644
--- a/test/transform/resource/messages-delombok/DelegateOnStatic.java.messages
+++ b/test/transform/resource/messages-delombok/DelegateOnStatic.java.messages
@@ -1,2 +1,2 @@
-5 @Delegate is legal only on instance fields or no-argument instance methods.
-9 @Delegate is legal only on instance fields or no-argument instance methods. \ No newline at end of file
+6 @Delegate is legal only on instance fields or no-argument instance methods.
+10 @Delegate is legal only on instance fields or no-argument instance methods. \ No newline at end of file
diff --git a/test/transform/resource/messages-delombok/FlagUsages.java.messages b/test/transform/resource/messages-delombok/FlagUsages.java.messages
new file mode 100644
index 00000000..13a148b1
--- /dev/null
+++ b/test/transform/resource/messages-delombok/FlagUsages.java.messages
@@ -0,0 +1,2 @@
+5 Use of @Getter is flagged according to lombok configuration.
+7 Use of any lombok.experimental feature is flagged according to lombok configuration.
diff --git a/test/transform/resource/messages-ecj/BuilderInvalidUse.java.messages b/test/transform/resource/messages-ecj/BuilderInvalidUse.java.messages
index 84942101..c5571b92 100644
--- a/test/transform/resource/messages-ecj/BuilderInvalidUse.java.messages
+++ b/test/transform/resource/messages-ecj/BuilderInvalidUse.java.messages
@@ -1,2 +1,2 @@
-1 @Getter, @Setter, @FieldDefaults, @Wither, @Data, @ToString, @EqualsAndHashCode, @AllArgsConstructor are not allowed on builder classes.
-12 @Value is not allowed on builder classes. \ No newline at end of file
+2 @Getter, @Setter, @FieldDefaults, @Wither, @Data, @ToString, @EqualsAndHashCode, @AllArgsConstructor are not allowed on builder classes.
+13 @Value is not allowed on builder classes. \ No newline at end of file
diff --git a/test/transform/resource/messages-ecj/DelegateOnStatic.java.messages b/test/transform/resource/messages-ecj/DelegateOnStatic.java.messages
index b807b155..51dcf501 100644
--- a/test/transform/resource/messages-ecj/DelegateOnStatic.java.messages
+++ b/test/transform/resource/messages-ecj/DelegateOnStatic.java.messages
@@ -1,2 +1,2 @@
-5 @Delegate is legal only on instance fields or no-argument instance methods.
-9 @Delegate is legal only on instance fields or no-argument instance methods. \ No newline at end of file
+6 @Delegate is legal only on instance fields or no-argument instance methods.
+10 @Delegate is legal only on instance fields or no-argument instance methods. \ No newline at end of file
diff --git a/test/transform/resource/messages-ecj/FlagUsages.java.messages b/test/transform/resource/messages-ecj/FlagUsages.java.messages
new file mode 100644
index 00000000..13a148b1
--- /dev/null
+++ b/test/transform/resource/messages-ecj/FlagUsages.java.messages
@@ -0,0 +1,2 @@
+5 Use of @Getter is flagged according to lombok configuration.
+7 Use of any lombok.experimental feature is flagged according to lombok configuration.