Package org.simpleframework.xml.filter
Class EnvironmentFilter
java.lang.Object
org.simpleframework.xml.filter.EnvironmentFilter
- All Implemented Interfaces:
Filter
The
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.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for theEnvironmentFilter
object.EnvironmentFilter
(Filter filter) Constructor for theEnvironmentFilter
object. -
Method Summary
-
Field Details
-
filter
Filter delegated to if no environment variable is resolved.
-
-
Constructor Details
-
EnvironmentFilter
public EnvironmentFilter()Constructor for theEnvironmentFilter
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. -
EnvironmentFilter
Constructor for theEnvironmentFilter
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.- Parameters:
filter
- the filter delegated to should resolution fail
-
-
Method Details
-
replace
Replaces the text provided with the value resolved from the environment variables. If the environment variables fail this will delegate to the specifiedFilter
if it is not a null object. If no match is found a null is returned.
-