Interface JDocComment

    • Method Detail

      • text

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

        JDocComment 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
        Specified by:
        block in interface JHtmlComment
        Returns:
        the comment sub-block
      • inlineDocTag

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

        JComment inlineDocTag​(java.lang.String tag)
        Add an inline doc tag.
        Specified by:
        inlineDocTag in interface JComment
        Parameters:
        tag - the tag name (without the leading @ sign)
        Returns:
        the body of the doc tag
      • sp

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

        JDocComment 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
        Specified by:
        typeName in interface JHtmlComment
        Parameters:
        type - the type name to add
        Returns:
        this comment
      • value

        JDocComment value​(JType type,
                          java.lang.String fieldName)
        Add a @value inline tag.
        Specified by:
        value in interface JHtmlComment
        Parameters:
        type - the value type
        fieldName - the value field name
        Returns:
        this HTML comment
      • docTag

        JHtmlComment docTag​(java.lang.String tag)
        Add a block tag.
        Parameters:
        tag - the tag name
        Returns:
        the block tag comment block
      • docTag

        JHtmlComment docTag​(java.lang.String tag,
                            java.lang.String firstWord)
        Add a block tag.
        Parameters:
        tag - the tag name
        firstWord - the tag body first word
        Returns:
        the block tag comment block
      • _return

        JHtmlComment _return()
        Add a @return tag.
        Returns:
        the tag body
      • _throws

        JHtmlComment _throws​(JType exceptionType)
        Add a @throws tag.
        Parameters:
        exceptionType - the type of exception
        Returns:
        the tag body
      • param

        JHtmlComment param​(java.lang.String name)
        Add a @param tag.
        Parameters:
        name - the parameter name
        Returns:
        the tag body