ValueSource
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 | 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 | Description |
---|---|---|
java.lang.Object |
getValue(java.lang.String expression) |
If the expression starts with 'env.' then trim this prefix.
|
addFeedback, addFeedback, clearFeedback, getFeedback
public EnvarBasedValueSource() throws java.io.IOException
java.io.IOException
- in case of an error.public EnvarBasedValueSource(boolean caseSensitive) throws java.io.IOException
caseSensitive
- Whether the environment variable key should be treated in a
case-sensitive manner for lookupsjava.io.IOException
- in case of an error.public java.lang.Object getValue(java.lang.String expression)
ValueSource
instance was created.expression
- envar expression, like 'HOME' or 'env.HOME'Copyright © 2018. All rights reserved.