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.DefaultPrefixLookupsHolderSingleton instance, initialized with the system properties. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance initialized with the given properties. -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddLookup(DefaultLookups lookup, Map<String, Lookup> map) Add the prefix and lookup fromlookuptomap.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
-
addLookup
Add the prefix and lookup fromlookuptomap.- Parameters:
lookup- lookup to addmap- map to add to
-
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 theDefaultLookupsenum.- 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
-
getDefaultPrefixLookups
Gets the default prefix lookups map.- Returns:
- default prefix lookups map
-