Class GenerateRecordSerializers

java.lang.Object
com.northconcepts.datapipeline.foundations.tools.GenerateRecordSerializers

public class GenerateRecordSerializers extends Object
A utility class for generating toRecord() and fromRecord(Record source) methods from existing Java beans.
  • Constructor Details

    • GenerateRecordSerializers

      public GenerateRecordSerializers()
  • Method Details

    • main

      public static void main(String[] args) throws Throwable
      Prints the serialization methods for the fully qualified class names given as arguments.
      Throws:
      Throwable
    • generate

      public void generate(Set<String> classNames) throws Throwable
      Prints toRecord() and fromRecord(Record) methods for each fully qualified class name to the print writer, with TODO comments for fields it cannot serialize.
      Throws:
      Throwable
    • getPrintWriter

      public PrintWriter getPrintWriter()
      Returns the writer the generated code is printed to (standard output if not set).
    • setPrintWriter

      public GenerateRecordSerializers setPrintWriter(PrintWriter printWriter)
      Sets the writer the generated code is printed to (standard output if not set).