Package org.openrewrite.test
Class RecipeSpec
java.lang.Object
org.openrewrite.test.RecipeSpec
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafterRecipe(UncheckedConsumer<org.openrewrite.RecipeRun> afterRecipe) afterTypeValidationOptions(TypeValidation typeValidation) allSources(UncheckedConsumer<SourceSpec<?>> allSources) Configuration that applies to all source file inputs.beforeRecipe(UncheckedConsumer<List<org.openrewrite.SourceFile>> beforeRecipe) cycles(int cycles) <E> RecipeSpecdataTable(Class<E> rowType, UncheckedConsumer<List<E>> extract) <E,V> RecipeSpec dataTableAsCsv(Class<? extends org.openrewrite.DataTable<?>> dataTableClass, String expect) <E,V> RecipeSpec dataTableAsCsv(String name, String expect) static RecipeSpecdefaults()executionContext(org.openrewrite.ExecutionContext ctx) expectedCyclesThatMakeChanges(int expectedCyclesThatMakeChanges) markerPrinter(org.openrewrite.PrintOutputCapture.MarkerPrinter markerPrinter) parser(org.openrewrite.Parser.Builder parser) printRecipe(RecipePrinter recipePrinter) recipe(InputStream yaml, String... activeRecipes) recipe(org.openrewrite.Recipe recipe) recipeExecutionContext(org.openrewrite.ExecutionContext ctx) recipeFromResource(String yamlResource, String... activeRecipes) recipeFromResources(String... activeRecipes) recipeFromYaml(String yaml, String... activeRecipes) recipes(org.openrewrite.Recipe... recipes) relativeTo(@Nullable Path relativeTo) sourceSet(Function<List<org.openrewrite.SourceFile>, org.openrewrite.LargeSourceSet> sourceSetBuilder) typeValidationOptions(TypeValidation typeValidation) validateRecipeSerialization(boolean validate)
-
Constructor Details
-
RecipeSpec
public RecipeSpec()
-
-
Method Details
-
defaults
-
allSources
Configuration that applies to all source file inputs. -
recipe
-
recipes
-
recipe
-
recipeFromYaml
-
recipeFromResource
-
recipeFromResources
-
parser
- Parameters:
parser- The parser supplier to use when a matching source file is found.- Returns:
- The current recipe spec.
-
executionContext
-
recipeExecutionContext
-
markerPrinter
-
relativeTo
-
cycles
-
beforeRecipe
-
afterRecipe
-
dataTable
@Incubating(since="7.35.0") public <E> RecipeSpec dataTable(Class<E> rowType, UncheckedConsumer<List<E>> extract) -
dataTableAsCsv
@Incubating(since="7.35.0") public <E,V> RecipeSpec dataTableAsCsv(Class<? extends org.openrewrite.DataTable<?>> dataTableClass, String expect) -
dataTableAsCsv
-
validateRecipeSerialization
-
sourceSet
public RecipeSpec sourceSet(Function<List<org.openrewrite.SourceFile>, org.openrewrite.LargeSourceSet> sourceSetBuilder) -
expectedCyclesThatMakeChanges
-
typeValidationOptions
-
afterTypeValidationOptions
-
printRecipe
-