public final class PreProcessor extends Object implements IPreProcessor
Basic implementation of IPreProcessor
.
This implementation will suffice for most of the scenarios in which specifying a pre-processor at a dialect is needed.
Constructor and Description |
---|
PreProcessor(TemplateMode templateMode,
Class<? extends ITemplateHandler> handlerClass,
int precedence) |
Modifier and Type | Method and Description |
---|---|
Class<? extends ITemplateHandler> |
getHandlerClass()
Returns the handler class for this pre-processor, the
ITemplateHandler that implements the
real logic to be executed. |
int |
getPrecedence()
Returns the precedence that should be applied to this pre-processor.
|
TemplateMode |
getTemplateMode()
Returns the template mode this pre-processor should be executed for.
|
public PreProcessor(TemplateMode templateMode, Class<? extends ITemplateHandler> handlerClass, int precedence)
public final TemplateMode getTemplateMode()
IPreProcessor
Returns the template mode this pre-processor should be executed for. A pre-processor can only be linked to a specific template mode.
getTemplateMode
in interface IPreProcessor
public final int getPrecedence()
IPreProcessor
Returns the precedence that should be applied to this pre-processor. This will determine the order in which
it will be executed in relation to any other pre-processors (note that the dialect precedence determined
by IPreProcessorDialect.getDialectPreProcessorPrecedence()
will be applied first).
getPrecedence
in interface IPreProcessor
public final Class<? extends ITemplateHandler> getHandlerClass()
IPreProcessor
Returns the handler class for this pre-processor, the ITemplateHandler
that implements the
real logic to be executed.
In order for pre-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 IPreProcessor
Copyright © 2017 The THYMELEAF team. All rights reserved.