Class RenderWithDot

java.lang.Object
ca.mcscert.jpipe.compiler.model.Transformation<String,byte[]>
ca.mcscert.jpipe.compiler.steps.transformations.RenderWithDot

public class RenderWithDot extends Transformation<String,byte[]>
Compilation step that renders DOT text to a binary image format by invoking the dot command-line tool.

The dot binary must be available on PATH. Use jpipe --doctor to verify before running.

stdin is written in a virtual thread while stdout is read in the caller thread, avoiding deadlock when the process's pipe buffers are smaller than the input.

  • Constructor Details

    • RenderWithDot

      public RenderWithDot(String dotFormat)
      Parameters:
      dotFormat - the dot -T format name, e.g. "png" or "jpeg".
  • Method Details

    • run

      protected byte[] run(String dotSource, CompilationContext ctx)
      Description copied from class: Transformation
      Business logic of this step. Must not return null; may throw any exception. Use ctx to report non-fatal diagnostics or inspect previously accumulated errors.
      Specified by:
      run in class Transformation<String,byte[]>
      Parameters:
      dotSource - the value produced by the previous step.
      ctx - compilation context carrying the source path and diagnostic bag.
      Returns:
      the transformed value — never null.