Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.configuration.interpol
Class EnvironmentLookup

    java.lang.Object
      org.apache.commons.lang.text.StrLookup
          org.apache.commons.configuration.interpol.EnvironmentLookup

    public class EnvironmentLookup

extends org.apache.commons.lang.text.StrLookup

A specialized lookup implementation that allows access to environment variables.

This implementation relies on `EnvironmentConfiguration` 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 1210620 2011-12-05 20:57:31Z oheger $
Author:
  Commons Configuration team

Constructor Summary
`EnvironmentLookup()`

Method Summary
`String` | `lookup(String key)` Performs a lookup for the specified variable.

Methods inherited from class org.apache.commons.lang.text.StrLookup
`mapLookup, noneLookup, systemPropertiesLookup`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EnvironmentLookup

    public EnvironmentLookup()

Method Detail

### lookup

    public String lookup(String key)

  Performs a lookup for the specified variable. This implementation directly delegates to a `EnvironmentConfiguration`.

  Specified by:
    `lookup` in class `org.apache.commons.lang.text.StrLookup`
  Parameters:
    `key` - the key to lookup
  Returns:
    the value of this key or null if it cannot be resolved

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.