Class TypedComment


public class TypedComment extends TypedEthereal
Realizes comments in a tdom model instance.
  • Constructor Details

    • TypedComment

      public TypedComment(String text)
      Comment with contents.
      Throws:
      IllegalArgumentException - in case of text==null
    • TypedComment

      public TypedComment()
      Comment with empty contents.
  • Method Details

    • getText

      public String getText()
      Returns the text contents.
      Returns:
      the text contents.
    • setText

      public void setText(String text)
      set the text contents.
      Throws:
      IllegalArgumentException - in case of text==null
    • encode

      public void encode(EncodingOutputStream out, TypedExtension ext) throws IOException
      Description copied from class: TypedNode
      Abstract fall-back method which MUST be overridden and always throws an Exception.
      Specified by:
      encode in class TypedNode
      Throws:
      IOException
    • dump

      public void dump(ContentHandler contentHandler, @Opt LexicalHandler lexicalHandler) throws SAXException
      Description copied from class: TypedEthereal
      Write this model component to a SAX output stream. Please note that in the SAX architecture, PIs are treated by a ContentHandler, but Comments by a LexicalHandler, so these two handlers must be supplied as a tandem for a method defined with this abstract class.
      Specified by:
      dump in class TypedEthereal
      Parameters:
      contentHandler - (never null) SAX handler for writing a TypedProcessingInstruction
      lexicalHandler - SAX handler for writing a Comment. If null, then the comments are silently discarded.
      Throws:
      SAXException