org.apache.commons.configuration2.interpol

## Class SystemPropertiesLookup

- java.lang.Object
- - org.apache.commons.configuration2.interpol.SystemPropertiesLookup

- All Implemented Interfaces:
    Lookup

  Deprecated.
  Use `DefaultLookups.SYSTEM_PROPERTIES`.

      @Deprecated
      public class SystemPropertiesLookup
      extends Object
      implements Lookup

  A specialized implementation of the `Lookup` interface that allows access to system properties.

  This implementation relies on `StrLookup.systemPropertiesLookup()` from the Commons Lang project to resolve system properties. It can be used for referencing system properties in configuration files in an easy way, for instance:

       current.user = ${sys:user.name}

  `SystemPropertiesLookup` is one of the standard lookups that is registered per default for each configuration.

  Since:
    2.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SystemPropertiesLookup()` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `lookup(String variable)` Deprecated. Looks up the value of the specified variable.

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

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

- - ### Constructor Detail

    - #### SystemPropertiesLookup

          public SystemPropertiesLookup()

      Deprecated.

  - ### Method Detail

    - #### lookup

          public Object lookup(String variable)

      Deprecated.
      Description copied from interface: `Lookup`
      Looks up the value of the specified variable. This method is called by `ConfigurationInterpolator` with the variable name extracted from the expression to interpolate (i.e. the prefix name has already been removed). A concrete implementation has to return the value of this variable or null if the variable name is unknown.
      Specified by:
        `lookup` in interface `Lookup`
      Parameters:
        `variable` - the name of the variable to be resolved
      Returns:
        the value of this variable or null

Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.