Class RenameBean

java.lang.Object
org.openrewrite.Recipe
org.openrewrite.ScanningRecipe<List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>>>
org.openrewrite.java.spring.RenameBean
All Implemented Interfaces:
Cloneable

public class RenameBean extends org.openrewrite.ScanningRecipe<List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>>>
  • 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable RenameBean
    fromDeclaration(org.openrewrite.java.tree.J.ClassDeclaration classDeclaration, String newName)
     
    static @Nullable RenameBean
    fromDeclaration(org.openrewrite.java.tree.J.ClassDeclaration classDeclaration, String newName, @Nullable String type)
     
    static @Nullable RenameBean
    fromDeclaration(org.openrewrite.java.tree.J.MethodDeclaration methodDeclaration, String newName)
     
    static @Nullable RenameBean
    fromDeclaration(org.openrewrite.java.tree.J.MethodDeclaration methodDeclaration, String newName, @Nullable String type)
     
     
     
    List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>>
    getInitialValue(org.openrewrite.ExecutionContext ctx)
     
    org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>
    getScanner(List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>> acc)
     
    org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>
    getVisitor(List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>> acc)
     

    Methods inherited from class org.openrewrite.ScanningRecipe

    buildRecipeList, generate, generate, getAccumulator, getRecipeList, getVisitor

    Methods inherited from class org.openrewrite.Recipe

    addDataTable, builder, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getTags, hashCode, maxCycles, noop, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RenameBean

      public RenameBean()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in class org.openrewrite.Recipe
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.openrewrite.Recipe
    • getInitialValue

      public List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>> getInitialValue(org.openrewrite.ExecutionContext ctx)
      Specified by:
      getInitialValue in class org.openrewrite.ScanningRecipe<List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>>>
    • getScanner

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>> acc)
      Specified by:
      getScanner in class org.openrewrite.ScanningRecipe<List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>>>
    • getVisitor

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>> acc)
      Overrides:
      getVisitor in class org.openrewrite.ScanningRecipe<List<org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>>>
    • fromDeclaration

      public static @Nullable RenameBean fromDeclaration(org.openrewrite.java.tree.J.MethodDeclaration methodDeclaration, String newName)
      Parameters:
      methodDeclaration - , which may or may not declare a bean
      newName - , 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 bean
      newName - , for the potential bean
      type - , 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 bean
      newName - , 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 bean
      newName - , for the potential bean
      type - , 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