16
16
package software .xdev .spring .data .eclipse .store ;
17
17
18
18
import java .util .Comparator ;
19
- import java .util .Objects ;
20
19
21
20
import org .jetbrains .annotations .NotNull ;
22
21
import org .openrewrite .ExecutionContext ;
29
28
import org .openrewrite .java .JavaTemplate ;
30
29
import org .openrewrite .java .tree .J ;
31
30
31
+ import lombok .AllArgsConstructor ;
32
+ import lombok .EqualsAndHashCode ;
33
+ import lombok .Getter ;
34
+ import lombok .NoArgsConstructor ;
35
+ import lombok .Setter ;
32
36
37
+
38
+ @ Getter
39
+ @ Setter
40
+ @ AllArgsConstructor
41
+ @ NoArgsConstructor
42
+ @ EqualsAndHashCode (callSuper = true )
33
43
public class AddAnnotationToOtherAnnotation extends Recipe
34
44
{
35
45
@ Option (displayName = "Existing annotation type" ,
@@ -54,22 +64,6 @@ public class AddAnnotationToOtherAnnotation extends Recipe
54
64
example = "Test" )
55
65
String annotationTypeToAddSimpleName ;
56
66
57
- public AddAnnotationToOtherAnnotation (
58
- final String existingAnnotationType ,
59
- final String annotationTypeToAdd ,
60
- final String classPath ,
61
- final String annotationTypeToAddSimpleName )
62
- {
63
- this .existingAnnotationType = existingAnnotationType ;
64
- this .annotationTypeToAdd = annotationTypeToAdd ;
65
- this .classPath = classPath ;
66
- this .annotationTypeToAddSimpleName = annotationTypeToAddSimpleName ;
67
- }
68
-
69
- public AddAnnotationToOtherAnnotation ()
70
- {
71
- }
72
-
73
67
@ Override
74
68
public @ NotNull String getDisplayName ()
75
69
{
@@ -127,58 +121,4 @@ public AddAnnotationToOtherAnnotation()
127
121
}
128
122
};
129
123
}
130
-
131
- public String getExistingAnnotationType ()
132
- {
133
- return this .existingAnnotationType ;
134
- }
135
-
136
- public String getAnnotationTypeToAdd ()
137
- {
138
- return this .annotationTypeToAdd ;
139
- }
140
-
141
- public String getClassPath ()
142
- {
143
- return this .classPath ;
144
- }
145
-
146
- public String getAnnotationTypeToAddSimpleName ()
147
- {
148
- return this .annotationTypeToAddSimpleName ;
149
- }
150
-
151
- @ Override
152
- public boolean equals (final Object o )
153
- {
154
- if (this == o )
155
- {
156
- return true ;
157
- }
158
- if (o == null || this .getClass () != o .getClass ())
159
- {
160
- return false ;
161
- }
162
- if (!super .equals (o ))
163
- {
164
- return false ;
165
- }
166
- final AddAnnotationToOtherAnnotation that = (AddAnnotationToOtherAnnotation )o ;
167
- return Objects .equals (this .existingAnnotationType , that .existingAnnotationType ) && Objects .equals (
168
- this .annotationTypeToAdd ,
169
- that .annotationTypeToAdd ) && Objects .equals (this .classPath , that .classPath ) && Objects .equals (
170
- this .annotationTypeToAddSimpleName ,
171
- that .annotationTypeToAddSimpleName );
172
- }
173
-
174
- @ Override
175
- public int hashCode ()
176
- {
177
- return Objects .hash (
178
- super .hashCode (),
179
- this .existingAnnotationType ,
180
- this .annotationTypeToAdd ,
181
- this .classPath ,
182
- this .annotationTypeToAddSimpleName );
183
- }
184
124
}
0 commit comments