Class ConfigurationInterpolator.DefaultPrefixLookupsHolder

java.lang.Object
org.apache.commons.configuration2.interpol.ConfigurationInterpolator.DefaultPrefixLookupsHolder
Enclosing class:
ConfigurationInterpolator

static final class ConfigurationInterpolator.DefaultPrefixLookupsHolder extends Object
Internal class used to construct the default Lookup map used by ConfigurationInterpolator.getDefaultPrefixLookups().
  • Field Details

  • Constructor Details

    • DefaultPrefixLookupsHolder

      DefaultPrefixLookupsHolder(Properties props)
      Construct a new instance initialized with the given properties.
      Parameters:
      props - initialization properties
  • Method Details

    • getDefaultPrefixLookups

      Map<String,Lookup> getDefaultPrefixLookups()
      Get the default prefix lookups map.
      Returns:
      default prefix lookups map
    • createDefaultLookups

      private static Map<String,Lookup> createDefaultLookups()
      Create the lookup map used when the user has requested no customization.
      Returns:
      default lookup map
    • parseLookups

      private static Map<String,Lookup> parseLookups(String str)
      Construct a lookup map by parsing the given string. The string is expected to contain comma or space-separated names of values from the DefaultLookups enum.
      Parameters:
      str - string to parse; not null
      Returns:
      lookup map parsed from the given string
      Throws:
      IllegalArgumentException - if the string does not contain a valid default lookup definition
    • addLookup

      private static void addLookup(DefaultLookups lookup, Map<String,Lookup> map)
      Add the prefix and lookup from lookup to map.
      Parameters:
      lookup - lookup to add
      map - map to add to