Package org.openrewrite.java.spring
Class RenameBean
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.java.spring.RenameBean
- All Implemented Interfaces:
Cloneable
public class RenameBean
extends org.openrewrite.Recipe
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe -
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable RenameBeanfromDeclaration(org.openrewrite.java.tree.J.ClassDeclaration classDeclaration, String newName) static @Nullable RenameBeanfromDeclaration(org.openrewrite.java.tree.J.ClassDeclaration classDeclaration, String newName, @Nullable String type) static @Nullable RenameBeanfromDeclaration(org.openrewrite.java.tree.J.MethodDeclaration methodDeclaration, String newName) static @Nullable RenameBeanfromDeclaration(org.openrewrite.java.tree.J.MethodDeclaration methodDeclaration, String newName, @Nullable String type) org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> Methods inherited from class org.openrewrite.Recipe
addDataTable, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll
-
Constructor Details
-
RenameBean
public RenameBean()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
- Specified by:
getDescriptionin classorg.openrewrite.Recipe
-
fromDeclaration
public static @Nullable RenameBean fromDeclaration(org.openrewrite.java.tree.J.MethodDeclaration methodDeclaration, String newName) - Parameters:
methodDeclaration- , which may or may not declare a beannewName- , for the potential bean- Returns:
- a recipe for this methodDeclaration if it declares a bean, or null if it does not declare a bean
-
fromDeclaration
public static @Nullable RenameBean fromDeclaration(org.openrewrite.java.tree.J.MethodDeclaration methodDeclaration, String newName, @Nullable String type) - Parameters:
methodDeclaration- , which may or may not declare a beannewName- , for the potential beantype- , to override the type field on the returned RenameBean instance- Returns:
- a recipe for this methodDeclaration if it declares a bean, or null if it does not declare a bean
-
fromDeclaration
public static @Nullable RenameBean fromDeclaration(org.openrewrite.java.tree.J.ClassDeclaration classDeclaration, String newName) - Parameters:
classDeclaration- , which may or may not declare a beannewName- , for the potential bean- Returns:
- a recipe for this classDeclaration if it declares a bean, or null if it does not declare a bean
-
fromDeclaration
public static @Nullable RenameBean fromDeclaration(org.openrewrite.java.tree.J.ClassDeclaration classDeclaration, String newName, @Nullable String type) - Parameters:
classDeclaration- , which may or may not declare a beannewName- , for the potential beantype- , to override the type field on the returned RenameBean instance- Returns:
- a recipe for this classDeclaration if it declares a bean, or null if it does not declare a bean
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()- Overrides:
getVisitorin classorg.openrewrite.Recipe
-