Class KrpcGenerator.Builder

java.lang.Object
io.kroxylicious.krpccodegen.main.KrpcGenerator.Builder
Enclosing class:
KrpcGenerator

public static class KrpcGenerator.Builder extends Object
Configures and instantiates the KrpcGenerator.
  • Method Details

    • withLogger

      public KrpcGenerator.Builder withLogger(System.Logger logger)
      configures logging.
      Parameters:
      logger - logger.
      Returns:
      this
    • withMessageSpecDir

      public KrpcGenerator.Builder withMessageSpecDir(File messageSpecDir)
      configures the message specification directory.
      Parameters:
      messageSpecDir - message specification directory.
      Returns:
      this
    • withMessageSpecFilter

      public KrpcGenerator.Builder withMessageSpecFilter(String messageSpecFilter)
      configures the glob pattern used to match message specification files.
      Parameters:
      messageSpecFilter - the glob pattern
      Returns:
      this
    • withTemplateDir

      public KrpcGenerator.Builder withTemplateDir(File templateDir)
      configures the directory contain the Apache Free Maker template.
      Parameters:
      templateDir - template directory.
      Returns:
      this
    • withTemplateNames

      public KrpcGenerator.Builder withTemplateNames(List<String> templateNames)
      configures a list of template file names.
      Parameters:
      templateNames - list of template file names.
      Returns:
      this
    • withOutputPackage

      public KrpcGenerator.Builder withOutputPackage(String outputPackage)
      configures the java package name to be used in the generated source.
      Parameters:
      outputPackage - output package name.
      Returns:
      this
    • withOutputDir

      public KrpcGenerator.Builder withOutputDir(File outputDir)
      configures the output directory to be used for the generated source files.
      Parameters:
      outputDir - output directory.
      Returns:
      this
    • withOutputFilePattern

      public KrpcGenerator.Builder withOutputFilePattern(String outputFilePattern)
      configures the pattern used to form the output file name. This understands two pattern ${messageSpecName} and ${templateName} which if present will be replaced by the message specification name the template name respectively.
      Parameters:
      outputFilePattern - output filename pattern.
      Returns:
      this
    • build

      public KrpcGenerator build()
      Creates the generator.
      Returns:
      the generator.