Package org.apache.commons.configuration2.interpol

# Class EnvironmentLookup

java.lang.Object
org.apache.commons.configuration2.interpol.EnvironmentLookup

All Implemented Interfaces:
  `Lookup`

@Deprecated public class EnvironmentLookup extends Object implements Lookup
Deprecated.
Use `DefaultLookups.ENVIRONMENT`.

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EnvironmentLookup()`
  Deprecated.
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `lookup(String key)`
  Deprecated.
  Performs a lookup for the specified variable.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### EnvironmentLookup

    public EnvironmentLookup()
    Deprecated.
    Constructs a new instance.

- ## Method Details

  - ### lookup

    public String lookup(String key)
    Deprecated.
    Performs a lookup for the specified variable. This implementation directly delegates to a `System.getenv()`.
    Specified by:
      `lookup` in interface `Lookup`
    Parameters:
      `key` - the key to lookup
    Returns:
      the value of this key or null if it cannot be resolved