Class DefaultConfiguration

java.lang.Object
io.micronaut.aot.core.config.DefaultConfiguration
All Implemented Interfaces:
Configuration

public class DefaultConfiguration extends Object implements Configuration
An implementation of configuration which uses properties as the backing store.
  • Constructor Details

    • DefaultConfiguration

      public DefaultConfiguration(Properties backingProperties)
  • Method Details

    • containsKey

      public boolean containsKey(String key)
      Returns true if the configuration contains an entry for the specified key.
      Specified by:
      containsKey in interface Configuration
      Parameters:
      key - the key to look for
      Returns:
      true if the configuration contains an entry for the key
    • mandatoryValue

      @NonNull public @NonNull String mandatoryValue(String key)
      Description copied from interface: Configuration
      Returns the value of the configuration for the requested key or fails if not available.
      Specified by:
      mandatoryValue in interface Configuration
      Parameters:
      key - the key to look for
      Returns:
      the value for the requested key
    • optionalValue

      public <T> T optionalValue(String key, Function<Optional<String>,T> producer)
      Description copied from interface: Configuration
      Returns the value for the requested key.
      Specified by:
      optionalValue in interface Configuration
      Type Parameters:
      T - the type of the return value
      Parameters:
      key - the configuration key
      producer - a function called to generate a transformed value
      Returns:
      a configured value
    • getRuntime

      @NonNull public @NonNull Runtime getRuntime()
      Description copied from interface: Configuration
      Returns the target runtime for optimizations.
      Specified by:
      getRuntime in interface Configuration
      Returns:
      the target runtime