1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package dev.metaschema.schemagen.datatype;
7
8 import java.util.Set;
9
10 import dev.metaschema.core.datatype.IDataTypeAdapter;
11 import edu.umd.cs.findbugs.annotations.NonNull;
12
13 /**
14 * Manages datatype mappings and tracks datatype usage during schema generation.
15 */
16 public interface IDatatypeManager {
17 /**
18 * Get the schema type name for the provided datatype adapter.
19 *
20 * @param datatype
21 * the datatype adapter to get the type name for
22 * @return the schema type name corresponding to the datatype
23 */
24 String getTypeNameForDatatype(@NonNull IDataTypeAdapter<?> datatype);
25
26 /**
27 * Get the set of datatype names that have been used during schema generation.
28 *
29 * @return an unmodifiable set of used datatype names
30 */
31 Set<String> getUsedTypes();
32 }