public abstract class AbstractElementTagProcessor extends AbstractProcessor implements IElementTagProcessor
Basic abstract implementation of IElementTagProcessor
for processors that match element
events by their element name (i.e. without looking at any attributes).
Constructor and Description |
---|
AbstractElementTagProcessor(TemplateMode templateMode,
String dialectPrefix,
String elementName,
boolean prefixElementName,
String attributeName,
boolean prefixAttributeName,
int precedence) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doProcess(ITemplateContext context,
IProcessableElementTag tag,
IElementTagStructureHandler structureHandler) |
protected String |
getDialectPrefix() |
MatchingAttributeName |
getMatchingAttributeName()
Returns the attribute name that would make this processor match (if any).
|
MatchingElementName |
getMatchingElementName()
Returns the element name that would make this processor match (if any).
|
void |
process(ITemplateContext context,
IProcessableElementTag tag,
IElementTagStructureHandler structureHandler)
Execute the processor.
|
getPrecedence, getTemplateMode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPrecedence, getTemplateMode
public AbstractElementTagProcessor(TemplateMode templateMode, String dialectPrefix, String elementName, boolean prefixElementName, String attributeName, boolean prefixAttributeName, int precedence)
protected final String getDialectPrefix()
public final MatchingElementName getMatchingElementName()
IElementProcessor
Returns the element name that would make this processor match (if any).
getMatchingElementName
in interface IElementProcessor
public final MatchingAttributeName getMatchingAttributeName()
IElementProcessor
Returns the attribute name that would make this processor match (if any).
getMatchingAttributeName
in interface IElementProcessor
public final void process(ITemplateContext context, IProcessableElementTag tag, IElementTagStructureHandler structureHandler)
IElementTagProcessor
Execute the processor.
The IProcessableElementTag
object argument is immutable, so all modifications to this object or any
instructions to be given to the engine should be done through the specified
IElementTagStructureHandler
handler.
process
in interface IElementTagProcessor
context
- the execution context.tag
- the event this processor is executing on.structureHandler
- the handler that will centralise modifications and commands to the engine.protected abstract void doProcess(ITemplateContext context, IProcessableElementTag tag, IElementTagStructureHandler structureHandler)
Copyright © 2016 The THYMELEAF team. All rights reserved.