Class Comment
java.lang.Object
org.tquadrat.foundation.xml.builder.internal.Comment
- All Implemented Interfaces:
Element
@ClassVersion(sourceVersion="$Id: Comment.java 1151 2025-10-01 21:32:15Z tquadrat $")
@API(status=INTERNAL,
since="0.0.5")
public class Comment
extends Object
implements Element
This class defines an SGML comment.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: Comment.java 1151 2025-10-01 21:32:15Z tquadrat $
- Since:
- 0.0.5
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.xml.builder.internal.Comment"
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the name of the element.Returns the parent of this element.final booleanisBlock()Returns the block flag.final <E extends Element>
voidsetParent(E parent) Sets the parent for this element.final StringtoString()final StringtoString(int indentationLevel, boolean prettyPrint) Returns a String representation for this element instance.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Element
getAttribute, getAttributes, getChildren, getNamespaces, hasChildren
-
Field Details
-
m_Parent
-
m_Text
-
HYPHEN_REPLACEMENT
The hyphen replacement (escaped).
-
-
Constructor Details
-
Comment
-
-
Method Details
-
getElementName
Returns the name of the element.- Specified by:
getElementNamein interfaceElement- Returns:
- The name of the element.
-
getParent
-
isBlock
Returns the block flag.
This flag is used in the conversion of the element into a String; it indicates whether the element is 'inline' (like an HTML <span>) or 'block' (as an HTML <div>). This is important only for elements where whitespace is relevant, like for HTML elements, as pretty printing will add additional whitespace around inline elements that can become visible on parsing (for HTML: on the rendered page).
XML elements for example will be always block as there whitespace is not that important.
Obviously,
trueindicates a block element, whilefalsestands for an inline element.The default is
true. -
setParent
-
toString
Returns a String representation for this element instance. -
toString
-
