java.lang.Object
org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter<T>
Type Parameters:
T - the properties type
Direct Known Subclasses:
PushRegistryPropertiesConfigAdapter, SimplePropertiesConfigAdapter, StatsdPropertiesConfigAdapter

public class PropertiesConfigAdapter<T> extends Object
Base class for properties to config adapters.
Since:
2.0.0
Author:
Phillip Webb, Nikolay Rybak
  • Constructor Details

    • PropertiesConfigAdapter

      public PropertiesConfigAdapter(T properties)
      Create a new PropertiesConfigAdapter instance.
      Parameters:
      properties - the source properties
  • Method Details

    • get

      protected final <V> V get(Function<T,V> getter, Supplier<V> fallback)
      Get the value from the properties or use a fallback from the defaults.
      Type Parameters:
      V - the value type
      Parameters:
      getter - the getter for the properties
      fallback - the fallback method, usually super interface method reference
      Returns:
      the property or fallback value