Class RenameBean

java.lang.Object
org.openrewrite.Recipe
org.openrewrite.java.spring.RenameBean
All Implemented Interfaces:
Cloneable

public class RenameBean extends org.openrewrite.Recipe
  • 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)
     
     
     
    org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>
     

    Methods inherited from class org.openrewrite.Recipe

    addDataTable, 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

    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
    • fromDeclaration

      @Nullable 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

      @Nullable public static @Nullable RenameBean fromDeclaration(org.openrewrite.java.tree.J.MethodDeclaration methodDeclaration, String newName, @Nullable @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

      @Nullable 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

      @Nullable public static @Nullable RenameBean fromDeclaration(org.openrewrite.java.tree.J.ClassDeclaration classDeclaration, String newName, @Nullable @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
    • getVisitor

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()
      Overrides:
      getVisitor in class org.openrewrite.Recipe