org.thymeleaf.dom
Class Comment

Object
  extended by org.thymeleaf.dom.Node
      extended by org.thymeleaf.dom.Comment
All Implemented Interfaces:
java.io.Serializable

public final class Comment
extends Node

A Comment node in a Thymeleaf DOM tree.

Since:
2.0.0
Author:
Daniel Fernández
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.thymeleaf.dom.Node
NODE_PROPERTY_XML_ENCODING, NODE_PROPERTY_XML_STANDALONE, NODE_PROPERTY_XML_VERSION
 
Constructor Summary
Comment(char[] content)
           
Comment(char[] content, String documentName)
           
Comment(char[] content, String documentName, Integer lineNumber)
           
Comment(String content)
           
Comment(String content, String documentName)
           
Comment(String content, String documentName, Integer lineNumber)
           
 
Method Summary
 String getContent()
           Returns the textual content of this node, as a String.
 char[] unsafeGetContentCharArray()
           Returns the unsafe inner char[] with the textual content of this code.
 void visit(DOMVisitor visitor)
           Apply a DOM visitor.
 
Methods inherited from class org.thymeleaf.dom.Node
applyDialectPrefix, cloneNode, getDocumentName, getLineNumber, getNodeLocalVariableNames, getNodeProperty, getNodePropertyNames, getParent, getRecomputeProcessorsAfterEachExecution, getRecomputeProcessorsImmediately, hasNodeLocalVariables, hasNodeProperty, hasParent, isSkippable, normalizeName, setAllNodeLocalVariables, setNodeLocalVariable, setNodeProperty, setParent, setRecomputeProcessorsAfterEachExecution, setRecomputeProcessorsImmediately, setSkippable, unsafeGetNodeLocalVariables, unsafeGetNodeProperties
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comment

public Comment(String content)

Comment

public Comment(char[] content)

Comment

public Comment(String content,
               String documentName)

Comment

public Comment(char[] content,
               String documentName)

Comment

public Comment(String content,
               String documentName,
               Integer lineNumber)

Comment

public Comment(char[] content,
               String documentName,
               Integer lineNumber)
Method Detail

getContent

public String getContent()

Returns the textual content of this node, as a String.

Returns:
the textual content of this node.

unsafeGetContentCharArray

public char[] unsafeGetContentCharArray()

Returns the unsafe inner char[] with the textual content of this code.

Calling this method avoids the need to create a new String object (like getContent() does, but requires to be extremely careful with the result, as any modification to the returned char array will actually modify the node's contents.

Returns:
the textual content of this node.

visit

public final void visit(DOMVisitor visitor)
Description copied from class: Node

Apply a DOM visitor.

Specified by:
visit in class Node
Parameters:
visitor - the visitor to be executed for this node.


Copyright © 2012 The THYMELEAF team. All Rights Reserved.