Interface CodeGenerator

All Superinterfaces:
WithDiagnostics

public interface CodeGenerator extends WithDiagnostics
Source code generation and compilation is performed with a language-specific CodeGenerator}, which must be interrogated for diagnostics to see if each call was successful or not.
  • Method Summary

    Modifier and Type
    Method
    Description
    compileCode(Path codeDir)
    Compiles the generated code in order to run it in a TDML test
    generateCode(String outputDir)
    Generates language-specific code from a DFDL schema to parse or unparse data

    Methods inherited from interface org.apache.daffodil.api.WithDiagnostics

    getDiagnostics, isError
  • Method Details

    • generateCode

      Path generateCode(String outputDir)
      Generates language-specific code from a DFDL schema to parse or unparse data
      Parameters:
      outputDir - output directory in which to create code directory (codeDir)
      Returns:
      path of newly created directory (codeDir) containing generated code
    • compileCode

      Path compileCode(Path codeDir)
      Compiles the generated code in order to run it in a TDML test
      Parameters:
      codeDir - path of newly created directory containing generated code
      Returns:
      path of newly built executable (exe) compiled from generated code