Package io.kroxylicious.krpccodegen.main
Class KrpcGenerator.Builder
java.lang.Object
io.kroxylicious.krpccodegen.main.KrpcGenerator.Builder
- Enclosing class:
KrpcGenerator
Configures and instantiates the
KrpcGenerator.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates the generator.withLogger(System.Logger logger) configures logging.withMessageSpecDir(File messageSpecDir) configures the message specification directory.withMessageSpecFilter(String messageSpecFilter) configures the glob pattern used to match message specification files.withOutputDir(File outputDir) configures the output directory to be used for the generated source files.withOutputFilePattern(String outputFilePattern) configures the pattern used to form the output file name.withOutputPackage(String outputPackage) configures the java package name to be used in the generated source.withTemplateDir(File templateDir) configures the directory contain the Apache Free Maker template.withTemplateNames(List<String> templateNames) configures a list of template file names.
-
Method Details
-
withLogger
configures logging.- Parameters:
logger- logger.- Returns:
- this
-
withMessageSpecDir
configures the message specification directory.- Parameters:
messageSpecDir- message specification directory.- Returns:
- this
-
withMessageSpecFilter
configures the glob pattern used to match message specification files.- Parameters:
messageSpecFilter- the glob pattern- Returns:
- this
-
withTemplateDir
configures the directory contain the Apache Free Maker template.- Parameters:
templateDir- template directory.- Returns:
- this
-
withTemplateNames
configures a list of template file names.- Parameters:
templateNames- list of template file names.- Returns:
- this
-
withOutputPackage
configures the java package name to be used in the generated source.- Parameters:
outputPackage- output package name.- Returns:
- this
-
withOutputDir
configures the output directory to be used for the generated source files.- Parameters:
outputDir- output directory.- Returns:
- this
-
withOutputFilePattern
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
Creates the generator.- Returns:
- the generator.
-