java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.Content
org.jdrupes.mdoclet.internal.doclets.formats.html.markup.TextBuilder

public class TextBuilder extends Content
Class for generating string content for HTML tags of javadoc output.

The content is mutable to the extent that additional content may be added. Newlines are always represented by \n. Any special HTML characters will be escaped if and when the content is written out.

  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Constructor to construct StringContent object.
    TextBuilder(CharSequence initialContent)
    Constructor to construct StringContent object with some initial content.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    add(CharSequence strContent)
    Adds content for the StringContent object.
    int
    Gibt the number of characters of plain text content in this object zurück.
    boolean
    Returns true if the content is empty.
    Returns a string representation of the content.
    boolean
    write(Writer out, String newline, boolean atNewline)
    Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.

    Von Klasse geerbte Methoden org.jdrupes.mdoclet.internal.doclets.toolkit.Content

    add, addAll, isDiscardable

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • TextBuilder

      public TextBuilder()
      Constructor to construct StringContent object.
    • TextBuilder

      public TextBuilder(CharSequence initialContent)
      Constructor to construct StringContent object with some initial content.
      Parameter:
      initialContent - initial content for the object
  • Methodendetails

    • add

      public TextBuilder add(CharSequence strContent)
      Adds content for the StringContent object.
      Setzt außer Kraft:
      add in Klasse Content
      Parameter:
      strContent - string content to be added
      Gibt zurück:
      this object
    • isEmpty

      public boolean isEmpty()
      Beschreibung aus Klasse kopiert: Content
      Returns true if the content is empty.
      Angegeben von:
      isEmpty in Klasse Content
      Gibt zurück:
      true if no content to be displayed else return false
    • charCount

      public int charCount()
      Beschreibung aus Klasse kopiert: Content
      Gibt the number of characters of plain text content in this object zurück.
      Setzt außer Kraft:
      charCount in Klasse Content
      Gibt zurück:
      the number of characters of plain text content in this object
    • toString

      public String toString()
      Beschreibung aus Klasse kopiert: Content
      Returns a string representation of the content.

      Newlines are represented by \n.

      Setzt außer Kraft:
      toString in Klasse Content
      Gibt zurück:
      string representation of the content
    • write

      public boolean write(Writer out, String newline, boolean atNewline) throws IOException
      Beschreibung aus Klasse kopiert: Content
      Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.
      Angegeben von:
      write in Klasse Content
      Parameter:
      out - the writer
      newline - the newline sequence to use
      atNewline - whether the writer has just written a newline
      Gibt zurück:
      whether the writer has just written a newline
      Löst aus:
      IOException - if an error occurs while writing the output