Package org.openrewrite.test
Interface RewriteRunner
- All Known Implementing Classes:
ModwRunner
public interface RewriteRunner
Strategy used by
RewriteTest.rewriteRun(org.openrewrite.test.SourceSpecs...) to execute a recipe over a set of
source files. The default IN_PROCESS runner invokes
Recipe.run(LargeSourceSet, ExecutionContext, int, int) in the test JVM.
Alternative runners can stand up an out-of-process backend (e.g. the moderne-cli
via the active.recipe hook) and translate its output back into a
RecipeRun, letting the same test source exercise multiple execution paths.
Select a runner per-test via RecipeSpec.runner(RewriteRunner) or per-class
by overriding RewriteTest.runner().
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classEverything a runner might want from the surroundingRewriteTestinvocation. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RewriteRunnerA ready-to-use no-override instance forRewriteTest.runner()defaults. -
Method Summary
Modifier and TypeMethodDescriptiondefault org.openrewrite.RecipeRunrun(org.openrewrite.Recipe recipe, RewriteRunner.Context context) Default in-JVM behavior.
-
Field Details
-
IN_PROCESS
A ready-to-use no-override instance forRewriteTest.runner()defaults. Behaves as plain in-process execution via the defaultrun(org.openrewrite.Recipe, org.openrewrite.test.RewriteRunner.Context)below.
-
-
Method Details
-
run
Default in-JVM behavior. Out-of-process runners override this.
-