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

public class RawHtml extends Content
Class for generating raw HTML content to be added to HTML pages of javadoc output.
  • Felddetails

  • Methodendetails

    • of

      public static RawHtml of(CharSequence rawHtml)
      Creates HTML for an arbitrary string of HTML.

      The string is accepted as-is and is not validated in any way. It should be syntactically well-formed and contain matching < and >, and matching quotes for attributes.

      Parameter:
      rawHtml - the string
      Gibt zurück:
      the HTML
    • startElement

      public static RawHtml startElement(CharSequence name, Content attrs, boolean selfClosing)
      Creates HTML for the start of an element.
      Parameter:
      name - the name of the element
      attrs - content containing any attributes
      selfClosing - whether this is a self-closing element.
      Gibt zurück:
      the HTML
    • endElement

      public static RawHtml endElement(CharSequence name)
      Creates HTML for the end of an element.
      Parameter:
      name - the name of the element
      Gibt zurück:
      the HTML
    • comment

      public static RawHtml comment(String body)
      Creates HTML for an HTML comment.

      The body will be enclosed in if it does not already begin and end with those sequences.

      Parameter:
      body - the body of the comment
      Gibt zurück:
      the HTML
    • cdata

      public static RawHtml cdata(String body)
      Creates HTML for an HTML CDATA section.

      The body will be enclosed in <![CDATA] and ]]> if it does not already begin and end with those sequences.

      Parameter:
      body - the body of the CDATA section
      Gibt zurück:
      the HTML
    • 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
    • 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
    • charCount

      protected static int charCount(CharSequence htmlText)
    • 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