Class ConfigSourceUtil

java.lang.Object
io.smallrye.config.common.utils.ConfigSourceUtil

public class ConfigSourceUtil extends Object
utilities and constants for ConfigSource implementations
Author:
helloween
  • Field Details

  • Method Details

    • propertiesToMap

      public static Map<String,String> propertiesToMap(Properties properties)
      convert Properties to Map
      Parameters:
      properties - Properties object
      Returns:
      Map object
    • urlToMap

      public static Map<String,String> urlToMap(URL locationOfProperties) throws IOException
      Throws:
      IOException
    • getOrdinalFromMap

      public static int getOrdinalFromMap(Map<String,String> map, int defaultOrdinal)
      Get the ordinal value configured within the given map.
      Parameters:
      map - the map to query
      defaultOrdinal - the ordinal to return if the ordinal key is not specified
      Returns:
      the ordinal value to use