- All Superinterfaces:
JStachioExtension
- All Known Implementing Classes:
JMustacheRenderer
Advises or filters a previously applied template.
- Author:
- agentgt
- API Note
- Implementations should be threadsafe!
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A fully composed chain that renders a model by applying filtering. -
Method Summary
Modifier and TypeMethodDescriptionstatic JStachioFilter
compose
(Iterable<JStachioFilter> filters) Creates a composite filter of a many filters.default JStachioFilter.FilterChain
filter
(TemplateInfo template) Applies filter with previous filter broken unless the parameter template is aJStachioFilter.FilterChain
or is aTemplate
which generated renderers usually are.filter
(TemplateInfo template, JStachioFilter.FilterChain previous) Advises or filters a previously created filter.default int
order()
Hint on order of filter chain.
-
Method Details
-
filter
Advises or filters a previously created filter.- Parameters:
template
- info about the templateprevious
- the function returned early in the chain.- Returns:
- an advised render function or often the previous render function if no advise is needed.
-
filter
Applies filter with previous filter broken unless the parameter template is aJStachioFilter.FilterChain
or is aTemplate
which generated renderers usually are.- Parameters:
template
- info about the template- Returns:
- an advised render function or often the previous render function if no advise is needed.
-
order
Hint on order of filter chain. The foundJStachioFilter
s are sorted naturally (lower number comes first) based on the returned number. Thus the filter that has the greatest say is the filter with the highest number.- Returns:
- default returns zero
-
compose
Creates a composite filter of a many filters.- Parameters:
filters
- not null.- Returns:
- a composite filter ordered by
order()
-