|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.thymeleaf.dom.Node
org.thymeleaf.dom.Comment
public final class Comment
A Comment node in a Thymeleaf DOM tree.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.thymeleaf.dom.Node |
---|
Node.NodeLocalVariablesMap |
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. |
void |
setContent(String content)
Modify the textual content of this node. |
char[] |
unsafeGetContentCharArray()
Returns the unsafe inner char[] with the textual content of this code. |
void |
unsafeSetContent(char[] newContent)
Modify the textual content of this node. |
void |
visit(DOMVisitor visitor)
Apply a DOM visitor. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Comment(String content)
public Comment(char[] content)
public Comment(String content, String documentName)
public Comment(char[] content, String documentName)
public Comment(String content, String documentName, Integer lineNumber)
public Comment(char[] content, String documentName, Integer lineNumber)
Method Detail |
---|
public String getContent()
Returns the textual content of this node, as a String.
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.
public void setContent(String content)
Modify the textual content of this node.
content
- the new contentpublic void unsafeSetContent(char[] newContent)
Modify the textual content of this node. This method is considered unsafe because it does not copy the specified array (instead, it is merely assigned to an internal variable).
newContent
- the new contentpublic void visit(DOMVisitor visitor)
Node
Apply a DOM visitor.
visit
in class Node
visitor
- the visitor to be executed for this node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |