Package org.simpleframework.xml.core
Class TemplateFilter
java.lang.Object
org.simpleframework.xml.core.TemplateFilter
- All Implemented Interfaces:
Filter
The
TemplateFilter
class is used to provide variables
to the template engine. This template acquires variables from two
different sources. Firstly this will consult the user contextual
Context
object, which can contain variables that have
been added during the deserialization process. If a variable is
not present from this context it asks the Filter
that
has been specified by the user.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTemplateFilter
(Context context, Filter filter) Constructor for theTemplateFilter
object. -
Method Summary
-
Field Details
-
context
This is the template context object used by the persister. -
filter
This is the filter object provided to the persister.
-
-
Constructor Details
-
TemplateFilter
Constructor for theTemplateFilter
object. This creates a filter object that acquires template values from two different contexts. Firstly theContext
is queried for a variables followed by theFilter
.- Parameters:
context
- this is the context object for the persisterfilter
- the filter that has been given to the persister
-
-
Method Details
-
replace
This will acquire the named variable value if it exists. If the named variable cannot be found in either the context or the user specified filter then this returns null.
-