Module dev.metaschema.databind
Package dev.metaschema.databind.codegen
Class DefaultModuleBindingGenerator
java.lang.Object
dev.metaschema.databind.codegen.DefaultModuleBindingGenerator
- All Implemented Interfaces:
IModuleBindingGenerator
Default implementation of
IModuleBindingGenerator that generates and
compiles Java classes for a Metaschema module.
This generator creates Java source files representing the module and its definitions, compiles them, and loads the resulting classes using a custom class loader.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultModuleBindingGenerator(Path compilePath) Construct a new binding generator that generates classes in the specified directory. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends IBoundModule>Generate bound Java classes for the provided Metaschema module.
-
Constructor Details
-
DefaultModuleBindingGenerator
Construct a new binding generator that generates classes in the specified directory.- Parameters:
compilePath- the directory where generated Java classes will be created and compiled
-
-
Method Details
-
generate
Description copied from interface:IModuleBindingGeneratorGenerate bound Java classes for the provided Metaschema module.- Specified by:
generatein interfaceIModuleBindingGenerator- Parameters:
module- the Metaschema module to generate classes for- Returns:
- the generated bound module class
- Throws:
MetaschemaException- if an error occurs during generation or compilation
-