Class DecoupledTemplateLogicBuilderMarkupHandler
- Object
-
- org.attoparser.AbstractMarkupHandler
-
- org.thymeleaf.templateparser.markup.decoupled.DecoupledTemplateLogicBuilderMarkupHandler
-
- All Implemented Interfaces:
org.attoparser.IAttributeSequenceHandler
,org.attoparser.ICDATASectionHandler
,org.attoparser.ICommentHandler
,org.attoparser.IDocTypeHandler
,org.attoparser.IDocumentHandler
,org.attoparser.IElementHandler
,org.attoparser.IMarkupHandler
,org.attoparser.IProcessingInstructionHandler
,org.attoparser.ITextHandler
,org.attoparser.IXMLDeclarationHandler
public final class DecoupledTemplateLogicBuilderMarkupHandler extends org.attoparser.AbstractMarkupHandler
Implementation of
IMarkupHandler
used for building and populating instances ofDecoupledTemplateLogic
as a result of parsing a decoupled template logic resource.Once built and populated, instances of
DecoupledTemplateLogic
are handled over toTemplateHandlerAdapterMarkupHandler
instances which are one of the steps in the template parsing chain (converting parser events intoITemplateHandler
events). Attributes specified here to be injected into the template are injected at real-time during the parsing operation itself, so that overhead is minimal (and zero once the template is cached).- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTRIBUTE_NAME_SEL
static String
TAG_NAME_ATTR
static String
TAG_NAME_LOGIC
-
Constructor Summary
Constructors Constructor Description DecoupledTemplateLogicBuilderMarkupHandler(String templateName, TemplateMode templateMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecoupledTemplateLogic
getDecoupledTemplateLogic()
void
handleAttribute(char[] buffer, int nameOffset, int nameLen, int nameLine, int nameCol, int operatorOffset, int operatorLen, int operatorLine, int operatorCol, int valueContentOffset, int valueContentLen, int valueOuterOffset, int valueOuterLen, int valueLine, int valueCol)
void
handleAutoCloseElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col)
void
handleCloseElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col)
void
handleOpenElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col)
void
handleOpenElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col)
void
handleStandaloneElementEnd(char[] buffer, int nameOffset, int nameLen, boolean minimized, int line, int col)
void
handleStandaloneElementStart(char[] buffer, int nameOffset, int nameLen, boolean minimized, int line, int col)
-
Methods inherited from class org.attoparser.AbstractMarkupHandler
handleAutoCloseElementStart, handleAutoOpenElementEnd, handleAutoOpenElementStart, handleCDATASection, handleCloseElementStart, handleComment, handleDocType, handleDocumentEnd, handleDocumentStart, handleInnerWhiteSpace, handleProcessingInstruction, handleText, handleUnmatchedCloseElementEnd, handleUnmatchedCloseElementStart, handleXmlDeclaration, setParseConfiguration, setParseSelection, setParseStatus
-
-
-
-
Field Detail
-
TAG_NAME_LOGIC
public static final String TAG_NAME_LOGIC
- See Also:
- Constant Field Values
-
TAG_NAME_ATTR
public static final String TAG_NAME_ATTR
- See Also:
- Constant Field Values
-
ATTRIBUTE_NAME_SEL
public static final String ATTRIBUTE_NAME_SEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DecoupledTemplateLogicBuilderMarkupHandler
public DecoupledTemplateLogicBuilderMarkupHandler(String templateName, TemplateMode templateMode)
-
-
Method Detail
-
getDecoupledTemplateLogic
public DecoupledTemplateLogic getDecoupledTemplateLogic()
-
handleStandaloneElementStart
public void handleStandaloneElementStart(char[] buffer, int nameOffset, int nameLen, boolean minimized, int line, int col) throws org.attoparser.ParseException
- Specified by:
handleStandaloneElementStart
in interfaceorg.attoparser.IElementHandler
- Overrides:
handleStandaloneElementStart
in classorg.attoparser.AbstractMarkupHandler
- Throws:
org.attoparser.ParseException
-
handleStandaloneElementEnd
public void handleStandaloneElementEnd(char[] buffer, int nameOffset, int nameLen, boolean minimized, int line, int col) throws org.attoparser.ParseException
- Specified by:
handleStandaloneElementEnd
in interfaceorg.attoparser.IElementHandler
- Overrides:
handleStandaloneElementEnd
in classorg.attoparser.AbstractMarkupHandler
- Throws:
org.attoparser.ParseException
-
handleOpenElementStart
public void handleOpenElementStart(char[] buffer, int nameOffset, int nameLen, int line, int col) throws org.attoparser.ParseException
- Specified by:
handleOpenElementStart
in interfaceorg.attoparser.IElementHandler
- Overrides:
handleOpenElementStart
in classorg.attoparser.AbstractMarkupHandler
- Throws:
org.attoparser.ParseException
-
handleOpenElementEnd
public void handleOpenElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col) throws org.attoparser.ParseException
- Specified by:
handleOpenElementEnd
in interfaceorg.attoparser.IElementHandler
- Overrides:
handleOpenElementEnd
in classorg.attoparser.AbstractMarkupHandler
- Throws:
org.attoparser.ParseException
-
handleCloseElementEnd
public void handleCloseElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col) throws org.attoparser.ParseException
- Specified by:
handleCloseElementEnd
in interfaceorg.attoparser.IElementHandler
- Overrides:
handleCloseElementEnd
in classorg.attoparser.AbstractMarkupHandler
- Throws:
org.attoparser.ParseException
-
handleAutoCloseElementEnd
public void handleAutoCloseElementEnd(char[] buffer, int nameOffset, int nameLen, int line, int col) throws org.attoparser.ParseException
- Specified by:
handleAutoCloseElementEnd
in interfaceorg.attoparser.IElementHandler
- Overrides:
handleAutoCloseElementEnd
in classorg.attoparser.AbstractMarkupHandler
- Throws:
org.attoparser.ParseException
-
handleAttribute
public void handleAttribute(char[] buffer, int nameOffset, int nameLen, int nameLine, int nameCol, int operatorOffset, int operatorLen, int operatorLine, int operatorCol, int valueContentOffset, int valueContentLen, int valueOuterOffset, int valueOuterLen, int valueLine, int valueCol) throws org.attoparser.ParseException
- Specified by:
handleAttribute
in interfaceorg.attoparser.IAttributeSequenceHandler
- Overrides:
handleAttribute
in classorg.attoparser.AbstractMarkupHandler
- Throws:
org.attoparser.ParseException
-
-