1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package dev.metaschema.databind.codegen.config;
7
8 import java.util.List;
9 import java.util.Map;
10
11 import edu.umd.cs.findbugs.annotations.NonNull;
12 import edu.umd.cs.findbugs.annotations.Nullable;
13
14 /**
15 * Provides binding configuration for a specific Metaschema definition.
16 * <p>
17 * This interface defines how an individual field or assembly definition is
18 * mapped to a generated Java class, including the class name, base class, and
19 * interfaces to implement.
20 */
21 public interface IDefinitionBindingConfiguration {
22 /**
23 * Get the class name to use for the generated class associated with this
24 * binding.
25 *
26 * @return a class name
27 */
28 @Nullable
29 String getClassName();
30
31 /**
32 * Get the class that the associated generated class will extend.
33 *
34 * @return a full type, including the package
35 */
36 @Nullable
37 String getQualifiedBaseClassName();
38
39 /**
40 * A collection of interfaces that the associated generated class will
41 * implement.
42 *
43 * @return a list of fully qualified type names for interfaces
44 */
45 @NonNull
46 List<String> getInterfacesToImplement();
47
48 /**
49 * Get the choice group binding configurations for this definition.
50 *
51 * <p>
52 * Choice group bindings provide configuration for choice groups within this
53 * assembly definition, keyed by the choice group's {@code group-as} name.
54 *
55 * @return a map of group-as name to choice group binding configuration
56 */
57 @NonNull
58 Map<String, IChoiceGroupBindingConfiguration> getChoiceGroupBindings();
59 }