Interface JStachioFilter

All Superinterfaces:
JStachioExtension
All Known Implementing Classes:
JMustacheRenderer

public non-sealed interface JStachioFilter extends JStachioExtension
Advises or filters a previously applied template.
Author:
agentgt
API Note
Implementations should be threadsafe!
  • Method Details

    • filter

      Advises or filters a previously created filter.
      Parameters:
      template - info about the template
      previous - 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 a JStachioFilter.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

      default int order()
      Hint on order of filter chain. The found JStachioFilters 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()