001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package gov.nist.secauto.metaschema.databind.codegen.config;
007
008import gov.nist.secauto.metaschema.core.model.IModelDefinition;
009import gov.nist.secauto.metaschema.core.model.IModule;
010
011import java.util.List;
012
013import edu.umd.cs.findbugs.annotations.NonNull;
014import edu.umd.cs.findbugs.annotations.Nullable;
015
016public interface IBindingConfiguration {
017
018  /**
019   * Generates a Java package name for the provided Module module.
020   *
021   * @param module
022   *          the Module module to generate a package name for
023   * @return a Java package name
024   */
025  @NonNull
026  String getPackageNameForModule(@NonNull IModule module);
027
028  /**
029   * Get the Java class name for the provided field or assembly definition.
030   *
031   * @param definition
032   *          the definition to generate the Java class name for
033   * @return a Java class name
034   */
035  @NonNull
036  String getClassName(@NonNull IModelDefinition definition);
037
038  /**
039   * Get the Java class name for the provided Module module.
040   *
041   * @param module
042   *          the Module module to generate the Java class name for
043   * @return a Java class name
044   */
045  @NonNull
046  String getClassName(@NonNull IModule module);
047
048  /**
049   * Get the Java class name of the base class to use for the class associated
050   * with the provided definition.
051   *
052   * @param definition
053   *          a definition that may be built as a class
054   * @return the name of the base class or {@code null} if no base class is to be
055   *         used
056   */
057  @Nullable
058  String getQualifiedBaseClassName(@NonNull IModelDefinition definition);
059
060  /**
061   * Get the Java class names of the superinterfaces to use for the class
062   * associated with the provided definition.
063   *
064   * @param definition
065   *          a definition that may be built as a class
066   * @return a list of superinterface class names
067   */
068  @NonNull
069  List<String> getQualifiedSuperinterfaceClassNames(@NonNull IModelDefinition definition);
070}