Class PreProcessor
- Object
-
- org.thymeleaf.preprocessor.PreProcessor
-
- All Implemented Interfaces:
IPreProcessor
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.
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
-
Constructor Summary
Constructors Constructor Description PreProcessor(TemplateMode templateMode, Class<? extends ITemplateHandler> handlerClass, int precedence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends ITemplateHandler>getHandlerClass()Returns the handler class for this pre-processor, theITemplateHandlerthat implements the real logic to be executed.intgetPrecedence()Returns the precedence that should be applied to this pre-processor.TemplateModegetTemplateMode()Returns the template mode this pre-processor should be executed for.
-
-
-
Constructor Detail
-
PreProcessor
public PreProcessor(TemplateMode templateMode, Class<? extends ITemplateHandler> handlerClass, int precedence)
-
-
Method Detail
-
getTemplateMode
public final TemplateMode getTemplateMode()
Description copied from interface:IPreProcessorReturns the template mode this pre-processor should be executed for. A pre-processor can only be linked to a specific template mode.
- Specified by:
getTemplateModein interfaceIPreProcessor- Returns:
- the template mode.
-
getPrecedence
public final int getPrecedence()
Description copied from interface:IPreProcessorReturns 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).- Specified by:
getPrecedencein interfaceIPreProcessor- Returns:
- the pre-processor precedence.
-
getHandlerClass
public final Class<? extends ITemplateHandler> getHandlerClass()
Description copied from interface:IPreProcessorReturns the handler class for this pre-processor, the
ITemplateHandlerthat implements the real logic to be executed.In order for pre-processors to work correctly, they need to implement correctly all the
ITemplateHandlercontract. In order to make this easier, extendingAbstractTemplateHandleris recommended.- Specified by:
getHandlerClassin interfaceIPreProcessor- Returns:
- the handler class.
-
-