Class DeclarativeRecipe

All Implemented Interfaces:
Cloneable

public class DeclarativeRecipe extends CompositeRecipe
  • Constructor Details

    • DeclarativeRecipe

      public DeclarativeRecipe()
  • Method Details

    • causesAnotherCycle

      public boolean causesAnotherCycle()
      Overrides:
      causesAnotherCycle in class Recipe
      Returns:
      Determines if another cycle is run when this recipe makes a change. In some cases, like changing method declaration names, a further cycle is needed to update method invocations of that declaration that were visited prior to the declaration change. But other visitors never need to cause another cycle, such as those that format whitespace or add search markers. Note that even when this is false, the recipe will still run on another cycle if any other recipe causes another cycle to run. But if every recipe reports no need to run another cycle (or if there are no changes made in a cycle), then another will not run.
    • initialize

      public void initialize(Collection<Recipe> availableRecipes, Map<String,List<Contributor>> recipeToContributors)
    • addUninitialized

      public void addUninitialized(DeclarativeRecipe.RecipeUse use, Recipe recipe)
    • addUninitialized

      public void addUninitialized(DeclarativeRecipe.RecipeUse use, String recipeName, @Nullable @Nullable ClassLoader classLoader)
    • addValidation

      public void addValidation(Validated validated)
    • validate

      public Validated validate()
      Description copied from class: Recipe
      The default implementation of validate on the recipe will look for package and field level annotations that indicate a field is not-null. The annotations must have run-time retention and the simple name of the annotation must match one of the common names defined in NullUtils
      Overrides:
      validate in class Recipe
      Returns:
      A validated instance based using non-null/nullable annotations to determine which fields of the recipe are required.
    • createRecipeDescriptor

      protected RecipeDescriptor createRecipeDescriptor()
      Overrides:
      createRecipeDescriptor in class Recipe
    • getContributors

      public List<Contributor> getContributors()
      Overrides:
      getContributors in class Recipe