001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.databind.codegen; 007 008import dev.metaschema.core.model.IModule; 009import dev.metaschema.core.model.MetaschemaException; 010import dev.metaschema.databind.model.IBoundModule; 011import edu.umd.cs.findbugs.annotations.NonNull; 012 013/** 014 * A functional interface for generating bound Java classes from a Metaschema 015 * module. 016 * <p> 017 * Implementations of this interface are responsible for generating, compiling, 018 * and loading Java classes that represent the module and its definitions. 019 */ 020@FunctionalInterface 021public interface IModuleBindingGenerator { 022 /** 023 * Generate bound Java classes for the provided Metaschema module. 024 * 025 * @param module 026 * the Metaschema module to generate classes for 027 * @return the generated bound module class 028 * @throws MetaschemaException 029 * if an error occurs during generation or compilation 030 */ 031 @NonNull 032 Class<? extends IBoundModule> generate(@NonNull IModule module) throws MetaschemaException; 033}