Package org.openrewrite.prethink
Class ExportContext
java.lang.Object
org.openrewrite.Recipe
org.openrewrite.ScanningRecipe<ExportContext.Accumulator>
org.openrewrite.prethink.ExportContext
- All Implemented Interfaces:
Cloneable
Export DataTables to CSV files in .moderne/context/ along with a markdown description.
This recipe exports data tables from a single recipe context and generates: - CSV files for each data table - A markdown file describing the context with data table schemas
The markdown file is named using the kebab-cased short name (e.g., test-coverage.md) and includes the display name, descriptions, and a schema for each data table.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe -
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCollection<org.openrewrite.SourceFile> generate(ExportContext.Accumulator acc, org.openrewrite.ExecutionContext ctx) Get the kebab-cased filename for this context's markdown file.getInitialValue(org.openrewrite.ExecutionContext ctx) org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> org.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> Methods inherited from class org.openrewrite.ScanningRecipe
clone, generate, getAccumulator, getVisitorMethods inherited from class org.openrewrite.Recipe
addDataTable, builder, buildRecipeList, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll, withOptions
-
Constructor Details
-
ExportContext
public ExportContext()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
- Specified by:
getDescriptionin classorg.openrewrite.Recipe
-
causesAnotherCycle
public boolean causesAnotherCycle()- Overrides:
causesAnotherCyclein classorg.openrewrite.Recipe
-
getInitialValue
- Specified by:
getInitialValuein classorg.openrewrite.ScanningRecipe<ExportContext.Accumulator>
-
getScanner
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(ExportContext.Accumulator acc) - Specified by:
getScannerin classorg.openrewrite.ScanningRecipe<ExportContext.Accumulator>
-
generate
public Collection<org.openrewrite.SourceFile> generate(ExportContext.Accumulator acc, org.openrewrite.ExecutionContext ctx) - Overrides:
generatein classorg.openrewrite.ScanningRecipe<ExportContext.Accumulator>
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(ExportContext.Accumulator acc) - Overrides:
getVisitorin classorg.openrewrite.ScanningRecipe<ExportContext.Accumulator>
-
getContextFilename
Get the kebab-cased filename for this context's markdown file.
-