Class JavaGenerator
java.lang.Object
gov.nist.secauto.metaschema.databind.codegen.JavaGenerator
Provides methods for generating Java classes based on a single or a
collection of Metaschemas.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IProduction
generate
(IModule module, Path targetDir, IBindingConfiguration bindingConfiguration) Generate Java sources for the provided Metaschema module.static IProduction
generate
(Collection<? extends IModule> modules, Path targetDirectory, IBindingConfiguration bindingConfiguration) Generates Java classes for Module fields and flags.
-
Method Details
-
generate
@NonNull public static IProduction generate(@NonNull IModule module, @NonNull Path targetDir, @NonNull IBindingConfiguration bindingConfiguration) throws IOException Generate Java sources for the provided Metaschema module.- Parameters:
module
- the Metaschema module to generate Java sources fortargetDir
- the directory to generate sources inbindingConfiguration
- the binding customizations to use when generating the Java classes- Returns:
- information about all the produced classes
- Throws:
IOException
- if an error occurred while generating the class
-
generate
@NonNull public static IProduction generate(@NonNull Collection<? extends IModule> modules, @NonNull Path targetDirectory, @NonNull IBindingConfiguration bindingConfiguration) throws IOException Generates Java classes for Module fields and flags.- Parameters:
modules
- the Metaschema modules to build classes fortargetDirectory
- the directory to generate classes inbindingConfiguration
- binding customizations that can be used to set namespaces, class names, and other aspects of generated classes- Returns:
- information about all the produced classes
- Throws:
IOException
- if a build error occurred while generating the class
-