Class MpConfigImpl

  • All Implemented Interfaces:
    org.eclipse.microprofile.config.Config

    public class MpConfigImpl
    extends Object
    implements org.eclipse.microprofile.config.Config
    • Method Detail

      • getValue

        public <T> T getValue​(String propertyName,
                              Class<T> propertyType)
        Specified by:
        getValue in interface org.eclipse.microprofile.config.Config
      • getOptionalValue

        public <T> Optional<T> getOptionalValue​(String propertyName,
                                                Class<T> propertyType)
        Specified by:
        getOptionalValue in interface org.eclipse.microprofile.config.Config
      • getPropertyNames

        public Iterable<String> getPropertyNames()
        Specified by:
        getPropertyNames in interface org.eclipse.microprofile.config.Config
      • getConfigSources

        public Iterable<org.eclipse.microprofile.config.spi.ConfigSource> getConfigSources()
        Specified by:
        getConfigSources in interface org.eclipse.microprofile.config.Config
      • getConverter

        public <T> Optional<org.eclipse.microprofile.config.spi.Converter<T>> getConverter​(Class<T> forType)
        Return the Converter used by this instance to produce instances of the specified type from string values. This method is from a future version of MP Config specification and may changed before it is released. It is nevertheless needed to process annotations with default values.
        Type Parameters:
        T - the conversion type
        Parameters:
        forType - the type to be produced by the converter
        Returns:
        an Optional containing the converter, or empty if no converter is available for the specified type