org.codehaus.plexus.util.interpolation
Class EnvarBasedValueSource
java.lang.Object
org.codehaus.plexus.util.interpolation.EnvarBasedValueSource
- All Implemented Interfaces:
- ValueSource
public class EnvarBasedValueSource
- extends java.lang.Object
- implements ValueSource
- Version:
- $Id: EnvarBasedValueSource.java 5956 2007-02-28 08:26:16Z olamy $
Constructor Summary |
EnvarBasedValueSource()
Create a new value source for interpolation based on shell environment variables. |
EnvarBasedValueSource(boolean caseSensitive)
Create a new value source for interpolation based on shell environment variables. |
Method Summary |
java.lang.Object |
getValue(java.lang.String expression)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
envars
private java.util.Properties envars
caseSensitive
private final boolean caseSensitive
EnvarBasedValueSource
public EnvarBasedValueSource()
throws java.io.IOException
- Create a new value source for interpolation based on shell environment variables. In this
case, envar keys ARE CASE SENSITIVE.
- Throws:
java.io.IOException
EnvarBasedValueSource
public EnvarBasedValueSource(boolean caseSensitive)
throws java.io.IOException
- Create a new value source for interpolation based on shell environment variables.
- Parameters:
caseSensitive
- Whether the environment variable key should be treated in a
case-sensitive manner for lookups
- Throws:
java.io.IOException
getValue
public java.lang.Object getValue(java.lang.String expression)
- Specified by:
getValue
in interface ValueSource
- Returns:
- the value related to the expression, or null if not found.