接口 OriginLookup<K>
- 类型参数:
K- the lookup key type
- 所有已知实现类:
OriginTrackedMapPropertySource,SystemEnvironmentPropertySourceEnvironmentPostProcessor.OriginAwareSystemEnvironmentPropertySource
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface OriginLookup<K>
An interface that may be implemented by an object that can lookupOrigininformation from a given key. Can be used to add origin support to existing classes.- 从以下版本开始:
- 2.0.0
方法详细资料
getOrigin
Origin getOrigin(K key)
Return the origin of the given key ornullif the origin cannot be determined.- 参数:
key- the key to lookup- 返回:
- the origin of the key or
null
getOrigin
static <K> Origin getOrigin(Object source, K key)
Attempt to lookup the origin from the given source. If the source is not aOriginLookupor if an exception occurs during lookup thennullis returned.- 类型参数:
K- the key type- 参数:
source- the source objectkey- the key to lookup- 返回:
- an
Originornull