Enum DefaultLookups
- java.lang.Object
-
- java.lang.Enum<DefaultLookups>
-
- org.apache.commons.configuration2.interpol.DefaultLookups
-
- All Implemented Interfaces:
Serializable,Comparable<DefaultLookups>
public enum DefaultLookups extends Enum<DefaultLookups>
An enumeration class defining constants for built-in
Lookupobjects available forConfigurationinstances.When a new configuration object derived from
AbstractConfigurationis created, it installs aConfigurationInterpolatorcontaining a default set ofLookupobjects. These lookups are defined by this enumeration class, however not all lookups may be included in the defaults. SeeConfigurationInterpolator.getDefaultPrefixLookups()for details.All the
Provides access to lookups defined in Apache Commons Text:Lookups defined here 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.- "base64Decoder" for the
Base64DecoderStringLookupsince Apache Commons Text 1.6. - "base64Encoder" for the
Base64EncoderStringLookupsince Apache Commons Text 1.6. - "const" for the
ConstantStringLookupsince Apache Commons Text 1.5. - "date" for the
DateStringLookup. - "env" for the
EnvironmentVariableStringLookup. - "file" for the
FileStringLookupsince Apache Commons Text 1.5. - "java" for the
JavaPlatformStringLookup. - "localhost" for the
LocalHostStringLookup, see#localHostStringLookup()for key names; since Apache Commons Text 1.3. - "properties" for the
PropertiesStringLookupsince Apache Commons Text 1.5. - "resourceBundle" for the
ResourceBundleStringLookupsince Apache Commons Text 1.5. - "script" for the
ScriptStringLookupsince Apache Commons Text 1.5. - "sys" for the
SystemPropertyStringLookup. - "url" for the
UrlStringLookupsince Apache Commons Text 1.5. - "urlDecoder" for the
UrlDecoderStringLookupsince Apache Commons Text 1.6. - "urlEncoder" for the
UrlEncoderStringLookupsince Apache Commons Text 1.6. - "xml" for the
XmlStringLookupsince Apache Commons Text 1.5.
- Since:
- 2.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASE64_DECODERThe lookup for Base64 decoding, accessed using the prefix"base64Decoder".BASE64_ENCODERThe lookup for Base64 encoding, accessed using the prefix"base64Encoder".CONSTThe lookup for Java constants, accessed using the prefix"const".DATEThe lookup for the current date in a specified format, accessed using the prefix"date".DNSThe lookup for DNS, accessed using the prefix"dns".ENVIRONMENTThe lookup for environment properties, accessed using the prefix"env".FILEThe lookup for file content, accessed using the prefix"file".JAVAThe lookup for Java platform information, accessed using the prefix"java".LOCAL_HOSTThe lookup for localhost information, accessed using the prefix"localhost".PROPERTIESThe lookup for properties, accessed using the prefix"properties".RESOURCE_BUNDLEThe lookup for resource bundles, accessed using the prefix"resourceBundle".SCRIPTThe lookup for scripts, accessed using the prefix"script".SYSTEM_PROPERTIESThe lookup for system properties, accessed using the prefix"sys".URLThe lookup for URLs, accessed using the prefix"url".URL_DECODERThe lookup for URL decoding, accessed using the prefix"urlDecoder".URL_ENCODERThe lookup for URL encoding, accessed using the prefix"urlEncoder".XMLThe lookup for XML content, accessed using the prefix"xml".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LookupgetLookup()Gets the standardLookupinstance of this kind.StringgetPrefix()Gets the standard prefix for the lookup object of this kind.static DefaultLookupsvalueOf(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
-
BASE64_DECODER
public static final DefaultLookups BASE64_DECODER
The lookup for Base64 decoding, accessed using the prefix"base64Decoder".- Since:
- 2.4
- See Also:
StringLookupFactory.base64DecoderStringLookup()
-
BASE64_ENCODER
public static final DefaultLookups BASE64_ENCODER
The lookup for Base64 encoding, accessed using the prefix"base64Encoder".- Since:
- 2.4
- See Also:
StringLookupFactory.base64EncoderStringLookup()
-
CONST
public static final DefaultLookups CONST
The lookup for Java constants, accessed using the prefix"const".- Since:
- 2.4
- See Also:
StringLookupFactory.constantStringLookup()
-
DATE
public static final DefaultLookups DATE
The lookup for the current date in a specified format, accessed using the prefix"date".- Since:
- 2.4
- See Also:
StringLookupFactory.dateStringLookup()
-
DNS
public static final DefaultLookups DNS
The lookup for DNS, accessed using the prefix"dns".- Since:
- 2.6
- See Also:
StringLookupFactory.dnsStringLookup()
-
ENVIRONMENT
public static final DefaultLookups ENVIRONMENT
The lookup for environment properties, accessed using the prefix"env".
-
FILE
public static final DefaultLookups FILE
The lookup for file content, accessed using the prefix"file".- Since:
- 2.4
- See Also:
StringLookupFactory.fileStringLookup()
-
JAVA
public static final DefaultLookups JAVA
The lookup for Java platform information, accessed using the prefix"java".- Since:
- 2.4
- See Also:
StringLookupFactory.javaPlatformStringLookup()
-
LOCAL_HOST
public static final DefaultLookups LOCAL_HOST
The lookup for localhost information, accessed using the prefix"localhost".- Since:
- 2.4
- See Also:
StringLookupFactory.localHostStringLookup()
-
PROPERTIES
public static final DefaultLookups PROPERTIES
The lookup for properties, accessed using the prefix"properties".- Since:
- 2.4
- See Also:
StringLookupFactory.propertiesStringLookup()
-
RESOURCE_BUNDLE
public static final DefaultLookups RESOURCE_BUNDLE
The lookup for resource bundles, accessed using the prefix"resourceBundle".- Since:
- 2.4
- See Also:
StringLookupFactory.resourceBundleStringLookup()
-
SCRIPT
public static final DefaultLookups SCRIPT
The lookup for scripts, accessed using the prefix"script".- Since:
- 2.4
- See Also:
StringLookupFactory.scriptStringLookup()
-
SYSTEM_PROPERTIES
public static final DefaultLookups SYSTEM_PROPERTIES
The lookup for system properties, accessed using the prefix"sys".
-
URL
public static final DefaultLookups URL
The lookup for URLs, accessed using the prefix"url".- Since:
- 2.4
- See Also:
StringLookupFactory.urlStringLookup()
-
URL_DECODER
public static final DefaultLookups URL_DECODER
The lookup for URL decoding, accessed using the prefix"urlDecoder".- Since:
- 2.4
- See Also:
StringLookupFactory.urlDecoderStringLookup()
-
URL_ENCODER
public static final DefaultLookups URL_ENCODER
The lookup for URL encoding, accessed using the prefix"urlEncoder".- Since:
- 2.4
- See Also:
StringLookupFactory.urlEncoderStringLookup()
-
XML
public static final DefaultLookups XML
The lookup for XML content, accessed using the prefix"xml".- Since:
- 2.4
- See Also:
StringLookupFactory.xmlStringLookup()
-
-
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(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getLookup
public Lookup getLookup()
Gets the standardLookupinstance of this kind.- Returns:
- the associated
Lookupobject
-
-