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
Lookup
objects available for eachConfiguration
object per default.When a new configuration object derived from
AbstractConfiguration
is created it installs aConfigurationInterpolator
with a default set ofLookup
objects. These lookups are defined by this enumeration class.All the default
Lookup
classes 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 CONST
The lookup for constants.ENVIRONMENT
The lookup for environment properties.SYSTEM_PROPERTIES
The lookup for system properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Lookup
getLookup()
Returns the standardLookup
instance of this kind.java.lang.String
getPrefix()
Returns the standard prefix for the lookup object of this kind.static DefaultLookups
valueOf(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 standardLookup
instance of this kind.- Returns:
- the associated
Lookup
object
-
-