Interface JHtmlComment

All Superinterfaces:
JComment
All Known Subinterfaces:
JDocComment, JHtmlTag

public interface JHtmlComment extends JComment
A comment that supports HTML content.
Author:
David M. Lloyd
  • Method Details

    • block

      JHtmlComment block()
      Add a comment sub-block at this location. The block has no visual representation but allows text to be inserted at the point of the block even after more content was appended after it.
      Specified by:
      block in interface JComment
      Returns:
      the comment sub-block
    • text

      JHtmlComment text(String text)
      Add some text to the end of this comment. No formatting or line breaks are inserted.
      Specified by:
      text in interface JComment
      Parameters:
      text - the text to add
      Returns:
      this comment
    • inlineDocTag

      JHtmlComment inlineDocTag(String tag, String body)
      Add an inline doc tag with simple content.
      Specified by:
      inlineDocTag in interface JComment
      Parameters:
      tag - the tag name (without the leading @ sign)
      body - the complete tag body
      Returns:
      this comment
    • sp

      Add a non-trailing space. If no content follows, the space will be omitted.
      Specified by:
      sp in interface JComment
      Returns:
      this comment
    • nl

      Add a newline.
      Specified by:
      nl in interface JComment
      Returns:
      this comment
    • typeName

      JHtmlComment typeName(JType type)
      Add a type name to the end of this comment. If the type is imported, it will emit as a simple name, otherwise it will emit as a qualified name.
      Specified by:
      typeName in interface JComment
      Parameters:
      type - the type name to add
      Returns:
      this comment
    • docRoot

      JHtmlComment docRoot()
      Add the {@docRoot} tag at this position.
      Specified by:
      docRoot in interface JComment
      Returns:
      this comment
    • p

      Add a paragraph separator.
      Returns:
      this HTML comment
    • br

      Add a line separator.
      Returns:
      this HTML comment
    • value

      JHtmlComment value(JType type, String fieldName)
      Add a @value inline tag.
      Parameters:
      type - the value type
      fieldName - the value field name
      Returns:
      this HTML comment
    • htmlLink

      JHtmlTag htmlLink(String url)
      Add an HTML link (<a> tag).
      Parameters:
      url - the URL to link to
      Returns:
      the link tag body
    • htmlTag

      JHtmlTag htmlTag(String tag, boolean newLine)
      Add an HTML tag. The given tag should be a valid HTML 4 or 5 tag.
      Parameters:
      tag - the HTML tag
      newLine - true to add a newline after the opening tag and before the closing tag
      Returns:
      the tag body
    • preformattedCode

      JComment preformattedCode()
      Add an inline @code tag within a <pre></pre> block.
      Returns:
      the preformatted code block content