Class JavaGenerator
- java.lang.Object
-
- gov.nist.secauto.metaschema.databind.codegen.JavaGenerator
-
public final class JavaGenerator extends Object
Provides methods for generating Java classes based on a single or a collection of Metaschemas.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IProductiongenerate(IModule module, Path targetDir, IBindingConfiguration bindingConfiguration)Generate Java sources for the provided Metaschema module.static IProductiongenerate(Collection<? extends IModule> modules, Path targetDirectory, IBindingConfiguration bindingConfiguration)Generates Java classes for Module fields and flags.
-
-
-
Method Detail
-
generate
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
-
-