public class EnvarBasedValueSource extends AbstractValueSource
ValueSource
which resolves expressions against the environment variables
available from the underlying operating system (and possibly, the shell environment
that created the present Java process). If the expression starts with 'env.',
this prefix is trimmed before resolving the rest as an environment variable name.Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
Object |
getValue(String expression)
If the expression starts with 'env.' then trim this prefix.
|
addFeedback, addFeedback, clearFeedback, getFeedback
public EnvarBasedValueSource() throws IOException
IOException
public EnvarBasedValueSource(boolean caseSensitive) throws IOException
caseSensitive
- Whether the environment variable key should be treated in a
case-sensitive manner for lookupsIOException
public Object getValue(String expression)
ValueSource
instance was created.expression
- envar expression, like 'HOME' or 'env.HOME'Copyright © 2019. All rights reserved.