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 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 for
      targetDir - the directory to generate sources in
      bindingConfiguration - 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 for
      targetDirectory - the directory to generate classes in
      bindingConfiguration - 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