Class AbstractMetaschemaMojo.ModuleBindingGenerator

java.lang.Object
dev.metaschema.maven.plugin.AbstractMetaschemaMojo.ModuleBindingGenerator
All Implemented Interfaces:
dev.metaschema.databind.codegen.IModuleBindingGenerator
Enclosing class:
AbstractMetaschemaMojo

public class AbstractMetaschemaMojo.ModuleBindingGenerator extends Object implements dev.metaschema.databind.codegen.IModuleBindingGenerator
A module binding generator that generates and compiles Java classes for Metaschema modules during plugin execution.

This generator uses the plugin's classpath for compilation, ensuring that all necessary dependencies are available during the code generation process.

  • Constructor Summary

    Constructors
    Constructor
    Description
    ModuleBindingGenerator(Path compilePath, dev.metaschema.databind.codegen.config.IBindingConfiguration bindingConfiguration)
    Construct a new module binding generator.
  • Method Summary

    Modifier and Type
    Method
    Description
    Class<? extends dev.metaschema.databind.model.IBoundModule>
    generate(dev.metaschema.core.model.IModule module)
     
    dev.metaschema.databind.codegen.IProduction
    generateClasses(dev.metaschema.core.model.IModule module)
    Generate Java source files for the specified module.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModuleBindingGenerator

      public ModuleBindingGenerator(@NonNull Path compilePath, @NonNull dev.metaschema.databind.codegen.config.IBindingConfiguration bindingConfiguration)
      Construct a new module binding generator.
      Parameters:
      compilePath - the directory path where generated classes will be compiled to
      bindingConfiguration - the binding configuration to use for code generation
  • Method Details

    • generateClasses

      @NonNull public dev.metaschema.databind.codegen.IProduction generateClasses(@NonNull dev.metaschema.core.model.IModule module) throws dev.metaschema.core.model.MetaschemaException
      Generate Java source files for the specified module.
      Parameters:
      module - the Metaschema module to generate classes for
      Returns:
      the production containing the generated class information
      Throws:
      dev.metaschema.core.model.MetaschemaException - if an error occurs during class generation
    • generate

      public Class<? extends dev.metaschema.databind.model.IBoundModule> generate(dev.metaschema.core.model.IModule module) throws dev.metaschema.core.model.MetaschemaException
      Specified by:
      generate in interface dev.metaschema.databind.codegen.IModuleBindingGenerator
      Throws:
      dev.metaschema.core.model.MetaschemaException