public final class PostProcessor extends Object implements IPostProcessor
Basic implementation of IPostProcessor
.
This implementation will suffice for most of the scenarios in which specifying a post-processor at a dialect is needed.
Constructor and Description |
---|
PostProcessor(TemplateMode templateMode,
Class<? extends ITemplateHandler> handlerClass,
int precedence) |
Modifier and Type | Method and Description |
---|---|
Class<? extends ITemplateHandler> |
getHandlerClass()
Returns the handler class for this post-processor, the
ITemplateHandler that implements the
real logic to be executed. |
int |
getPrecedence()
Returns the precedence that should be applied to this post-processor.
|
TemplateMode |
getTemplateMode()
Returns the template mode this post-processor should be executed for.
|
public PostProcessor(TemplateMode templateMode, Class<? extends ITemplateHandler> handlerClass, int precedence)
public final TemplateMode getTemplateMode()
IPostProcessor
Returns the template mode this post-processor should be executed for. A post-processor can only be linked to a specific template mode.
getTemplateMode
in interface IPostProcessor
public final int getPrecedence()
IPostProcessor
Returns the precedence that should be applied to this post-processor. This will determine the order in which
it will be executed in relation to any other post-processors (note that the dialect precedence determined
by IPostProcessorDialect.getDialectPostProcessorPrecedence()
will be applied first).
getPrecedence
in interface IPostProcessor
public final Class<? extends ITemplateHandler> getHandlerClass()
IPostProcessor
Returns the handler class for this post-processor, the ITemplateHandler
that implements the
real logic to be executed.
In order for post-processors to work correctly, they need to implement correctly all the
ITemplateHandler
contract. In order to make this easier, extending
AbstractTemplateHandler
is recommended.
getHandlerClass
in interface IPostProcessor
Copyright © 2017 The THYMELEAF team. All rights reserved.