Class PostProcessor
- All Implemented Interfaces:
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.
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
Constructor Summary
ConstructorsConstructorDescriptionPostProcessor
(TemplateMode templateMode, Class<? extends ITemplateHandler> handlerClass, int precedence) -
Method Summary
Modifier and TypeMethodDescriptionfinal Class<? extends ITemplateHandler>
Returns the handler class for this post-processor, theITemplateHandler
that implements the real logic to be executed.final int
Returns the precedence that should be applied to this post-processor.final TemplateMode
Returns the template mode this post-processor should be executed for.
-
Constructor Details
-
PostProcessor
public PostProcessor(TemplateMode templateMode, Class<? extends ITemplateHandler> handlerClass, int precedence)
-
-
Method Details
-
getTemplateMode
Description copied from interface:IPostProcessor
Returns the template mode this post-processor should be executed for. A post-processor can only be linked to a specific template mode.
- Specified by:
getTemplateMode
in interfaceIPostProcessor
- Returns:
- the template mode.
-
getPrecedence
public final int getPrecedence()Description copied from interface: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).- Specified by:
getPrecedence
in interfaceIPostProcessor
- Returns:
- the post-processor precedence.
-
getHandlerClass
Description copied from interface: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, extendingAbstractTemplateHandler
is recommended.- Specified by:
getHandlerClass
in interfaceIPostProcessor
- Returns:
- the handler class.
-