RecipeRunner

open class RecipeRunner(val logger: RunnerLogger)(source)

Executes an OpenRewrite org.openrewrite.Recipe against a list of parsed source files and returns the org.openrewrite.Result changeset.

Uses org.openrewrite.internal.InMemoryLargeSourceSet to hold all source files in memory simultaneously, which is required for cross-file analysis (e.g., renaming a type used across multiple files). For large projects, increase the JVM heap with -Xmx.

Constructors

Link copied to clipboard
constructor(logger: RunnerLogger)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun run(recipe: Recipe, sourceFiles: List<SourceFile>, ctx: ExecutionContext = defaultContext()): List<Result>

Run recipe against sourceFiles and return all org.openrewrite.Results.