1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.databind.codegen.config;
7   
8   import gov.nist.secauto.metaschema.core.model.IModelDefinition;
9   import gov.nist.secauto.metaschema.core.model.IModule;
10  
11  import java.util.List;
12  
13  import edu.umd.cs.findbugs.annotations.NonNull;
14  import edu.umd.cs.findbugs.annotations.Nullable;
15  
16  public interface IBindingConfiguration {
17  
18    /**
19     * Generates a Java package name for the provided Module module.
20     *
21     * @param module
22     *          the Module module to generate a package name for
23     * @return a Java package name
24     */
25    @NonNull
26    String getPackageNameForModule(@NonNull IModule module);
27  
28    /**
29     * Get the Java class name for the provided field or assembly definition.
30     *
31     * @param definition
32     *          the definition to generate the Java class name for
33     * @return a Java class name
34     */
35    @NonNull
36    String getClassName(@NonNull IModelDefinition definition);
37  
38    /**
39     * Get the Java class name for the provided Module module.
40     *
41     * @param module
42     *          the Module module to generate the Java class name for
43     * @return a Java class name
44     */
45    @NonNull
46    String getClassName(@NonNull IModule module);
47  
48    /**
49     * Get the Java class name of the base class to use for the class associated
50     * with the provided definition.
51     *
52     * @param definition
53     *          a definition that may be built as a class
54     * @return the name of the base class or {@code null} if no base class is to be
55     *         used
56     */
57    @Nullable
58    String getQualifiedBaseClassName(@NonNull IModelDefinition definition);
59  
60    /**
61     * Get the Java class names of the superinterfaces to use for the class
62     * associated with the provided definition.
63     *
64     * @param definition
65     *          a definition that may be built as a class
66     * @return a list of superinterface class names
67     */
68    @NonNull
69    List<String> getQualifiedSuperinterfaceClassNames(@NonNull IModelDefinition definition);
70  }