FixedValueSource
public class EnvarBasedValueSource extends java.lang.Object implements FixedValueSource
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,
InterpolationState interpolationState) |
If the expression starts with 'env.' then trim this prefix.
|
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, InterpolationState interpolationState)
ValueSource
instance was created.getValue
in interface FixedValueSource
expression
- envar expression, like 'HOME' or 'env.HOME'interpolationState
- InterpolationState
.Copyright © 2018. All rights reserved.