yangys
2024-03-31 2969df3e404db3cd116f27db1495e523ce05bf86
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
41
42
43
44
45
46
47
48
49
50
51
52
package com.qianwen.core.tool.metadata.config;
 
/* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/metadata/config/ConfigKey.class */
public interface ConfigKey<V> {
    String getKey();
 
    default String getName() {
        return getKey();
    }
 
    default Class<V> getType() {
        //return Object.class;
        return (Class<V>)Object.class;
    }
 
    static <T> ConfigKey<T> of(String key) {
        return of(key, key);
    }
 
    static <T> ConfigKey<T> of(String key, String name) {
        //return SimpleConfigKey.of(key, name, Object.class);
        return SimpleConfigKey.of(key, name, (Class)Object.class);
    }
 
    static <T> ConfigKey<T> of(String key, String name, Class<T> type) {
        return SimpleConfigKey.of(key, name, (Class) type);
    }
 
    default ConfigKeyValue<V> value(final V value) {
        return new ConfigKeyValue<V>() { // from class: org.springblade.core.tool.metadata.config.ConfigKey.1
            @Override // org.springblade.core.tool.metadata.config.ConfigKeyValue
            public V getValue() {
                return (V) value;
            }
 
            @Override // org.springblade.core.tool.metadata.config.ConfigKey
            public String getKey() {
                return ConfigKey.this.getKey();
            }
 
            @Override // org.springblade.core.tool.metadata.config.ConfigKey
            public String getName() {
                return ConfigKey.this.getName();
            }
 
            @Override // org.springblade.core.tool.metadata.config.ConfigKey
            public Class<V> getType() {
                return ConfigKey.this.getType();
            }
        };
    }
}