Class CommentImpl

  • All Implemented Interfaces:
    NodeInfo, javax.xml.transform.dom.DOMLocator, javax.xml.transform.Source, javax.xml.transform.SourceLocator, org.w3c.dom.CharacterData, org.w3c.dom.Comment, org.w3c.dom.Node

    final class CommentImpl
    extends NodeImpl
    implements org.w3c.dom.Comment
    CommentImpl is an implementation of a Comment node
    Author:
    Michael H. Kay
    • Field Detail

      • comment

        java.lang.String comment
    • Constructor Detail

      • CommentImpl

        public CommentImpl​(java.lang.String content)
    • Method Detail

      • getNodeName

        public final java.lang.String getNodeName()
        Get the name of this node, following the DOM rules
        Specified by:
        getNodeName in interface org.w3c.dom.Node
        Overrides:
        getNodeName in class AbstractNode
        Returns:
        "#comment"
      • getStringValue

        public final java.lang.String getStringValue()
        Description copied from interface: NodeInfo
        Return the string value of the node. The interpretation of this depends on the type of node. For an element it is the accumulated character content of the element, including descendant elements.
        Specified by:
        getStringValue in interface NodeInfo
        Returns:
        the string value of the node
      • getNodeType

        public final short getNodeType()
        Description copied from interface: NodeInfo
        Return the type of node.
        Specified by:
        getNodeType in interface org.w3c.dom.Node
        Specified by:
        getNodeType in interface NodeInfo
        Returns:
        one of the values Node.ELEMENT, Node.TEXT, Node.ATTRIBUTE, etc.
      • copy

        public void copy​(Outputter out)
                  throws javax.xml.transform.TransformerException
        Copy this node to a given outputter
        Specified by:
        copy in interface NodeInfo
        Throws:
        javax.xml.transform.TransformerException