Class ConfigurationInterpolator.DefaultPrefixLookupsHolder
java.lang.Object
org.apache.commons.configuration2.interpol.ConfigurationInterpolator.DefaultPrefixLookupsHolder
- Enclosing class:
ConfigurationInterpolator
Internal class used to construct the default
Lookup
map used by
ConfigurationInterpolator.getDefaultPrefixLookups()
.-
Field Summary
FieldsModifier and TypeFieldDescriptionDefault lookup map.(package private) static final ConfigurationInterpolator.DefaultPrefixLookupsHolder
Singleton instance, initialized with the system properties. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance initialized with the given properties. -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addLookup
(DefaultLookups lookup, Map<String, Lookup> map) Add the prefix and lookup fromlookup
tomap
.Create the lookup map used when the user has requested no customization.Gets the default prefix lookups map.parseLookups
(String str) Constructs a lookup map by parsing the given string.
-
Field Details
-
INSTANCE
Singleton instance, initialized with the system properties. -
defaultLookups
Default lookup map.
-
-
Constructor Details
-
DefaultPrefixLookupsHolder
DefaultPrefixLookupsHolder(Properties props) Constructs a new instance initialized with the given properties.- Parameters:
props
- initialization properties
-
-
Method Details
-
getDefaultPrefixLookups
Gets the default prefix lookups map.- Returns:
- default prefix lookups map
-
createDefaultLookups
Create the lookup map used when the user has requested no customization.- Returns:
- default lookup map
-
parseLookups
Constructs a lookup map by parsing the given string. The string is expected to contain comma or space-separated names of values from theDefaultLookups
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
Add the prefix and lookup fromlookup
tomap
.- Parameters:
lookup
- lookup to addmap
- map to add to
-