Package org.thymeleaf.engine
Class XMLDeclaration
java.lang.Object
org.thymeleaf.engine.AbstractTemplateEvent
org.thymeleaf.engine.XMLDeclaration
- All Implemented Interfaces:
IEngineTemplateEvent,ITemplateEvent,IXMLDeclaration
final class XMLDeclaration
extends AbstractTemplateEvent
implements IXMLDeclaration, IEngineTemplateEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final StringFields inherited from class org.thymeleaf.engine.AbstractTemplateEvent
col, line, templateName -
Constructor Summary
ConstructorsConstructorDescriptionXMLDeclaration(String encoding) XMLDeclaration(String keyword, String version, String encoding, String standalone) XMLDeclaration(String xmlDeclaration, String keyword, String version, String encoding, String standalone, String templateName, int line, int col) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept a visitor, implementation ofIModelVisitor.(package private) static XMLDeclarationasEngineXMLDeclaration(IXMLDeclaration xmlDeclaration) voidbeHandled(ITemplateHandler handler) private StringReturns the value of theencodingattribute specified at the XML Declaration (if specified).Returns the keyword of the XML Declaration in its original case (usuallyxml).Returns the value of thestandaloneattribute specified at the XML Declaration (if specified).Returns the XML version specified at the XML Declaration (if specified).Returns the complete XML Declaration as a String.toString()voidWrites this event to the specifiedWriter.Methods inherited from class org.thymeleaf.engine.AbstractTemplateEvent
getCol, getLine, getTemplateName, hasLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.thymeleaf.model.ITemplateEvent
getCol, getLine, getTemplateName, hasLocation
-
Field Details
-
DEFAULT_KEYWORD
- See Also:
-
DEFAULT_VERSION
- See Also:
-
ATTRIBUTE_NAME_VERSION
- See Also:
-
ATTRIBUTE_NAME_ENCODING
- See Also:
-
ATTRIBUTE_NAME_STANDALONE
- See Also:
-
keyword
-
version
-
encoding
-
standalone
-
xmlDeclaration
-
-
Constructor Details
-
XMLDeclaration
XMLDeclaration(String encoding) -
XMLDeclaration
-
XMLDeclaration
-
-
Method Details
-
getKeyword
Description copied from interface:IXMLDeclarationReturns the keyword of the XML Declaration in its original case (usually
xml).- Specified by:
getKeywordin interfaceIXMLDeclaration- Returns:
- the XML Declaration keyword.
-
getVersion
Description copied from interface:IXMLDeclarationReturns the XML version specified at the XML Declaration (if specified).
- Specified by:
getVersionin interfaceIXMLDeclaration- Returns:
- the XML version (might be null).
-
getEncoding
Description copied from interface:IXMLDeclarationReturns the value of the
encodingattribute specified at the XML Declaration (if specified).- Specified by:
getEncodingin interfaceIXMLDeclaration- Returns:
- the encoding value (might be null).
-
getStandalone
Description copied from interface:IXMLDeclarationReturns the value of the
standaloneattribute specified at the XML Declaration (if specified).- Specified by:
getStandalonein interfaceIXMLDeclaration- Returns:
- the standalone value (might be null).
-
getXmlDeclaration
Description copied from interface:IXMLDeclarationReturns the complete XML Declaration as a String.
- Specified by:
getXmlDeclarationin interfaceIXMLDeclaration- Returns:
- the complete XML Declaration.
-
computeXmlDeclaration
-
accept
Description copied from interface:ITemplateEventAccept a visitor, implementation of
IModelVisitor.- Specified by:
acceptin interfaceITemplateEvent- Parameters:
visitor- the visitor.
-
write
Description copied from interface:ITemplateEventWrites this event to the specified
Writer.Template output performed at
OutputTemplateHandleris done by calling these methods at each of the events resulting from template processing.- Specified by:
writein interfaceITemplateEvent- Parameters:
writer- the writer this event should be written to.- Throws:
IOException- if an input/output exception occurs.
-
asEngineXMLDeclaration
-
beHandled
- Specified by:
beHandledin interfaceIEngineTemplateEvent
-
toString
-