Class PostProcessor
- java.lang.Object
-
- org.thymeleaf.postprocessor.PostProcessor
-
- All Implemented Interfaces:
IPostProcessor
public final class PostProcessor extends java.lang.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.
- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<? extends ITemplateHandler>handlerClassprivate intprecedenceprivate TemplateModetemplateMode
-
Constructor Summary
Constructors Constructor Description PostProcessor(TemplateMode templateMode, java.lang.Class<? extends ITemplateHandler> handlerClass, int precedence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends ITemplateHandler>getHandlerClass()Returns the handler class for this post-processor, theITemplateHandlerthat implements the real logic to be executed.intgetPrecedence()Returns the precedence that should be applied to this post-processor.TemplateModegetTemplateMode()Returns the template mode this post-processor should be executed for.
-
-
-
Field Detail
-
templateMode
private final TemplateMode templateMode
-
handlerClass
private final java.lang.Class<? extends ITemplateHandler> handlerClass
-
precedence
private final int precedence
-
-
Constructor Detail
-
PostProcessor
public PostProcessor(TemplateMode templateMode, java.lang.Class<? extends ITemplateHandler> handlerClass, int precedence)
-
-
Method Detail
-
getTemplateMode
public final TemplateMode getTemplateMode()
Description copied from interface:IPostProcessorReturns the template mode this post-processor should be executed for. A post-processor can only be linked to a specific template mode.
- Specified by:
getTemplateModein interfaceIPostProcessor- Returns:
- the template mode.
-
getPrecedence
public final int getPrecedence()
Description copied from interface:IPostProcessorReturns 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:
getPrecedencein interfaceIPostProcessor- Returns:
- the post-processor precedence.
-
getHandlerClass
public final java.lang.Class<? extends ITemplateHandler> getHandlerClass()
Description copied from interface:IPostProcessorReturns the handler class for this post-processor, the
ITemplateHandlerthat implements the real logic to be executed.In order for post-processors to work correctly, they need to implement correctly all the
ITemplateHandlercontract. In order to make this easier, extendingAbstractTemplateHandleris recommended.- Specified by:
getHandlerClassin interfaceIPostProcessor- Returns:
- the handler class.
-
-