Skip to content

Commit 95c5969

Browse files
Update AddAnnotationToOtherAnnotation with lombok
1 parent fd74f3e commit 95c5969

File tree

1 file changed

+11
-71
lines changed

1 file changed

+11
-71
lines changed

spring-data-eclipse-store-migration/src/main/java/software/xdev/spring/data/eclipse/store/AddAnnotationToOtherAnnotation.java

Lines changed: 11 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package software.xdev.spring.data.eclipse.store;
1717

1818
import java.util.Comparator;
19-
import java.util.Objects;
2019

2120
import org.jetbrains.annotations.NotNull;
2221
import org.openrewrite.ExecutionContext;
@@ -29,7 +28,18 @@
2928
import org.openrewrite.java.JavaTemplate;
3029
import org.openrewrite.java.tree.J;
3130

31+
import lombok.AllArgsConstructor;
32+
import lombok.EqualsAndHashCode;
33+
import lombok.Getter;
34+
import lombok.NoArgsConstructor;
35+
import lombok.Setter;
3236

37+
38+
@Getter
39+
@Setter
40+
@AllArgsConstructor
41+
@NoArgsConstructor
42+
@EqualsAndHashCode(callSuper = true)
3343
public class AddAnnotationToOtherAnnotation extends Recipe
3444
{
3545
@Option(displayName = "Existing annotation type",
@@ -54,22 +64,6 @@ public class AddAnnotationToOtherAnnotation extends Recipe
5464
example = "Test")
5565
String annotationTypeToAddSimpleName;
5666

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-
7367
@Override
7468
public @NotNull String getDisplayName()
7569
{
@@ -127,58 +121,4 @@ public AddAnnotationToOtherAnnotation()
127121
}
128122
};
129123
}
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-
}
184124
}

0 commit comments

Comments
 (0)