Class CompositeRecipe

java.lang.Object
org.openrewrite.Recipe
org.openrewrite.config.CompositeRecipe
All Implemented Interfaces:
Cloneable

public class CompositeRecipe extends Recipe
A recipe that exists only to wrap other recipes. Anonymous recipe classes aren't serializable/deserializable so use this, or another named type, instead
  • Constructor Details

    • CompositeRecipe

      public CompositeRecipe()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Description copied from class: Recipe
      A human-readable display name for the recipe, initial capped with no period. For example, "Find text". The display name can be assumed to be rendered in documentation and other places where markdown is understood, so it is possible to use stylistic markers like backticks to indicate types. For example, "Find uses of `java.util.List`".
      Specified by:
      getDisplayName in class Recipe
      Returns:
      The display name.
    • getDescription

      public String getDescription()
      Description copied from class: Recipe
      A human-readable description for the recipe, consisting of one or more full sentences ending with a period.

      "Find methods by pattern." is an example. The description can be assumed to be rendered in documentation and other places where markdown is understood, so it is possible to use stylistic markers like backticks to indicate types. For example, "Find uses of `java.util.List`.".

      Specified by:
      getDescription in class Recipe
      Returns:
      The display name.
    • getEstimatedEffortPerOccurrence

      public Duration getEstimatedEffortPerOccurrence()
      Overrides:
      getEstimatedEffortPerOccurrence in class Recipe
      Returns:
      An estimated effort were a developer to fix manually instead of using this recipe.
    • getRecipeList

      public List<Recipe> getRecipeList()
      Description copied from class: Recipe
      A list of recipes that run, source file by source file, after this recipe. This method is guaranteed to be called only once per cycle.

      When creating a recipe with a fixed recipe list, either override this method or Recipe.buildRecipeList(RecipeList) but ideally not both, as their default implementations are interconnected.

      Overrides:
      getRecipeList in class Recipe
      Returns:
      The list of recipes to run.
    • getDataTableDescriptors

      public List<DataTableDescriptor> getDataTableDescriptors()
      Overrides:
      getDataTableDescriptors in class Recipe