public class EnvironmentFilter extends java.lang.Object implements Filter
EnvironmentFilter object is used to provide a
filter that will replace the specified values with an environment
variable from the OS. This can be given a delegate filter which
can be used to resolve replacements should the value requested
not match an environment variable from the OS.| Constructor and Description |
|---|
EnvironmentFilter()
Constructor for the
EnvironmentFilter object. |
EnvironmentFilter(Filter filter)
Constructor for the
EnvironmentFilter object. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
replace(java.lang.String text)
Replaces the text provided with the value resolved from the
environment variables.
|
public EnvironmentFilter()
EnvironmentFilter object. This
creates a filter that resolves replacements using environment
variables. Should the environment variables not contain the
requested mapping this will return a null value.public EnvironmentFilter(Filter filter)
EnvironmentFilter object. This
creates a filter that resolves replacements using environment
variables. Should the environment variables not contain the
requested mapping this will delegate to the specified filter.filter - the filter delegated to should resolution failpublic java.lang.String replace(java.lang.String text)
Filter if it is
not a null object. If no match is found a null is returned.