yangys
2024-04-02 1a77b1a7c072b136925d6d73c4d8f017ca016e3a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.qianwen.core.tool.metadata.types;
 
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Supplier;
import com.qianwen.core.tool.metadata.DataType;
 
/* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/metadata/types/DataTypes.class */
public class DataTypes {
    private static final Map<String, Supplier<DataType>> supports = new ConcurrentHashMap();
 
    static {
        supports.put(ArrayType.ID, ArrayType::new);
        supports.put(BooleanType.ID, BooleanType::new);
        supports.put(DateTimeType.ID, DateTimeType::new);
        supports.put(DoubleType.ID, DoubleType::new);
        supports.put(EnumType.ID, EnumType::new);
        supports.put(FloatType.ID, FloatType::new);
        supports.put(IntType.ID, IntType::new);
        supports.put(LongType.ID, LongType::new);
        supports.put(ObjectType.ID, ObjectType::new);
        supports.put(StringType.ID, StringType::new);
        supports.put("text", StringType::new);
        supports.put(GeoType.ID, GeoType::new);
        supports.put("file", FileType::new);
        supports.put(PasswordType.ID, PasswordType::new);
        supports.put(GeoShapeType.ID, GeoShapeType::new);
    }
 
    public static void register(String id, Supplier<DataType> supplier) {
        supports.put(id, supplier);
    }
 
    public static Supplier<DataType> lookup(String id) {
        if (id == null) {
            return null;
        }
        return supports.get(id);
    }
}