Class EnvironmentLookup
- java.lang.Object
-
- org.apache.commons.configuration2.interpol.EnvironmentLookup
-
- All Implemented Interfaces:
Lookup
public class EnvironmentLookup extends java.lang.Object implements Lookup
A specialized lookup implementation that allows access to environment variables.
This implementation relies on
System.getenv()
to resolve environment variables. It can be used for referencing environment variables in configuration files in an easy way, for instance:java.home = ${env:JAVA_HOME}
EnvironmentLookup
is one of the standard lookups that is registered per default for each configuration.- Since:
- 1.7
- Version:
- $Id: EnvironmentLookup.java 1679784 2015-05-16 17:46:21Z oheger $
- Author:
- Commons Configuration team
-
-
Constructor Summary
Constructors Constructor Description EnvironmentLookup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
lookup(java.lang.String key)
Performs a lookup for the specified variable.
-