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 Classes
    Modifier and Type
    Interface
    Description
    static class 
    Everything a runner might want from the surrounding RewriteTest invocation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final RewriteRunner
    A ready-to-use no-override instance for RewriteTest.runner() defaults.
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.openrewrite.RecipeRun
    run(org.openrewrite.Recipe recipe, RewriteRunner.Context context)
    Default in-JVM behavior.