类 PropertiesConfigAdapter<T>
- java.lang.Object
- org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter<T>
- 类型参数:
T
- the properties type
- 直接已知子类:
SimplePropertiesConfigAdapter
,StatsdPropertiesConfigAdapter
,StepRegistryPropertiesConfigAdapter
public class PropertiesConfigAdapter<T> extends Object
Base class for properties to config adapters.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 PropertiesConfigAdapter(T properties)
Create a newPropertiesConfigAdapter
instance.
构造器详细资料
PropertiesConfigAdapter
public PropertiesConfigAdapter(T properties)
Create a newPropertiesConfigAdapter
instance.- 参数:
properties
- the source properties
方法详细资料
get
protected final <V> V get(Function<T,V> getter, Supplier<V> fallback)
Get the value from the properties or use a fallback from thedefaults
.- 类型参数:
V
- the value type- 参数:
getter
- the getter for the propertiesfallback
- the fallback method, usually super interface method reference- 返回:
- the property or fallback value