Class CommentImpl

All Implemented Interfaces:
NodeInfo, DOMLocator, Source, SourceLocator, CharacterData, Comment, Node

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

  • Constructor Details

    • CommentImpl

      public CommentImpl(String content)
  • Method Details

    • getNodeName

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

      public final 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 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 TransformerException
      Copy this node to a given outputter
      Specified by:
      copy in interface NodeInfo
      Throws:
      TransformerException