Class ExportContext

java.lang.Object
org.openrewrite.Recipe
org.openrewrite.ScanningRecipe<ExportContext.Accumulator>
org.openrewrite.prethink.ExportContext
All Implemented Interfaces:
Cloneable

public class ExportContext extends org.openrewrite.ScanningRecipe<ExportContext.Accumulator>
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 Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Collection<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, getVisitor

    Methods 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

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExportContext

      public ExportContext()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in class org.openrewrite.Recipe
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.openrewrite.Recipe
    • causesAnotherCycle

      public boolean causesAnotherCycle()
      Overrides:
      causesAnotherCycle in class org.openrewrite.Recipe
    • getInitialValue

      public ExportContext.Accumulator getInitialValue(org.openrewrite.ExecutionContext ctx)
      Specified by:
      getInitialValue in class org.openrewrite.ScanningRecipe<ExportContext.Accumulator>
    • getScanner

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getScanner(ExportContext.Accumulator acc)
      Specified by:
      getScanner in class org.openrewrite.ScanningRecipe<ExportContext.Accumulator>
    • generate

      public Collection<org.openrewrite.SourceFile> generate(ExportContext.Accumulator acc, org.openrewrite.ExecutionContext ctx)
      Overrides:
      generate in class org.openrewrite.ScanningRecipe<ExportContext.Accumulator>
    • getVisitor

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor(ExportContext.Accumulator acc)
      Overrides:
      getVisitor in class org.openrewrite.ScanningRecipe<ExportContext.Accumulator>
    • getContextFilename

      public String getContextFilename()
      Get the kebab-cased filename for this context's markdown file.