Enum DefaultLookups
- java.lang.Object
-
- java.lang.Enum<DefaultLookups>
-
- org.apache.commons.configuration2.interpol.DefaultLookups
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DefaultLookups>
public enum DefaultLookups extends java.lang.Enum<DefaultLookups>
An enumeration class defining constants for the
Lookupobjects available for eachConfigurationobject per default.When a new configuration object derived from
AbstractConfigurationis created it installs aConfigurationInterpolatorwith a default set ofLookupobjects. These lookups are defined by this enumeration class.All the default
Lookupclasses are state-less, thus their instances can be shared between multiple configuration objects. Therefore, it makes sense to keep shared instances in this enumeration class.- Since:
- 2.0
- Version:
- $Id: DefaultLookups.java 1624601 2014-09-12 18:04:36Z oheger $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONSTThe lookup for constants.ENVIRONMENTThe lookup for environment properties.SYSTEM_PROPERTIESThe lookup for system properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LookupgetLookup()Returns the standardLookupinstance of this kind.java.lang.StringgetPrefix()Returns the standard prefix for the lookup object of this kind.static DefaultLookupsvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DefaultLookups[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SYSTEM_PROPERTIES
public static final DefaultLookups SYSTEM_PROPERTIES
The lookup for system properties.
-
ENVIRONMENT
public static final DefaultLookups ENVIRONMENT
The lookup for environment properties.
-
CONST
public static final DefaultLookups CONST
The lookup for constants.
-
-
Method Detail
-
values
public static DefaultLookups[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DefaultLookups c : DefaultLookups.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultLookups valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getPrefix
public java.lang.String getPrefix()
Returns the standard prefix for the lookup object of this kind.- Returns:
- the prefix
-
getLookup
public Lookup getLookup()
Returns the standardLookupinstance of this kind.- Returns:
- the associated
Lookupobject
-
-