Register escapers or filters.
A class that is annotated represents a content type such as Html and will be used as a
factory for creating escapers as well as a marker for the content type.
There are two supported escaper types:
io.jstach.api.runtime.Escaper
java.util.function.Function<String,String>
On the otherhand the Escaper interfaces allows potentially greater performance if you need to escape native types. n.b. the class annotated does not need to implement the interfaces
- Author:
- agentgt, Victor Nazarov
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A sentinel null object content type marker to auto resolve the content type based on config found elsewhere. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionMedia Type of the template to help in renderer lookup.A static method that will return an implementation ofio.jstach.api.runtime.Escaper
orFunction<String,String>
-
Element Details
-
providesMethod
A static method that will return an implementation ofio.jstach.api.runtime.Escaper
orFunction<String,String>
- Returns:
- default method name is
provider
just like theServiceLoader
- Default:
- "provider"
-
mediaType
Media Type of the template to help in renderer lookup.- Returns:
- media type of the template or empty string no media type
- Default:
- ""
-