Skip to content

Commit

Permalink
Standardize RemoveMethodInvocation
Browse files Browse the repository at this point in the history
  • Loading branch information
sambsnyd committed Nov 30, 2023
1 parent 1e6f6e9 commit 3ec1662
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package org.openrewrite.java.migrate;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Value;
import org.openrewrite.ExecutionContext;
import org.openrewrite.Option;
import org.openrewrite.Recipe;
Expand All @@ -25,17 +25,14 @@
import org.openrewrite.java.MethodMatcher;
import org.openrewrite.staticanalysis.RemoveMethodCallVisitor;

@Value
@EqualsAndHashCode(callSuper = true)
public class RemoveMethodInvocation extends Recipe {
@Option(displayName = "Method Pattern",
description = "A method pattern for matching required method definition.",
example = "*..* hello(..)")
@NonNull
private String methodPattern;

@JsonCreator
public RemoveMethodInvocation(@JsonProperty("methodPattern") String methodPattern) {
this.methodPattern = methodPattern;
}
String methodPattern;

@Override
public String getDisplayName() {
Expand Down

0 comments on commit 3ec1662

Please sign in to comment.