Package org.jboss.jdeparser
Interface JHtmlComment
-
- All Superinterfaces:
JComment
- All Known Subinterfaces:
JDocComment
,JHtmlTag
- All Known Implementing Classes:
AbstractJDocComment
,AbstractJHtmlComment
,DocTagJHtmlComment
,ImplJDocComment
,ImplJHtmlTag
,NestedDocCommentContent
,NestedHtmlCommentContent
public interface JHtmlComment extends JComment
A comment that supports HTML content.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JHtmlComment
block()
Add a comment sub-block at this location.JHtmlComment
br()
Add a line separator.JHtmlComment
docRoot()
Add the{@docRoot}
tag at this position.JHtmlTag
htmlLink(java.lang.String url)
Add an HTML link (<a>
tag).JHtmlTag
htmlTag(java.lang.String tag, boolean newLine)
Add an HTML tag.JHtmlComment
inlineDocTag(java.lang.String tag, java.lang.String body)
Add an inline doc tag with simple content.JHtmlComment
nl()
Add a newline.JHtmlComment
p()
Add a paragraph separator.JComment
preformattedCode()
Add an inline@code
tag within a<pre></pre>
block.JHtmlComment
sp()
Add a non-trailing space.JHtmlComment
text(java.lang.String text)
Add some text to the end of this comment.JHtmlComment
typeName(JType type)
Add a type name to the end of this comment.JHtmlComment
value(JType type, java.lang.String fieldName)
Add a@value
inline tag.-
Methods inherited from interface org.jboss.jdeparser.JComment
code, inlineDocTag, linkConstructor, linkField, linkMethod, linkMethod, linkType
-
-
-
-
Method Detail
-
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.
-
text
JHtmlComment text(java.lang.String text)
Add some text to the end of this comment. No formatting or line breaks are inserted.
-
inlineDocTag
JHtmlComment inlineDocTag(java.lang.String tag, java.lang.String body)
Add an inline doc tag with simple content.- Specified by:
inlineDocTag
in interfaceJComment
- Parameters:
tag
- the tag name (without the leading@
sign)body
- the complete tag body- Returns:
- this comment
-
sp
JHtmlComment sp()
Add a non-trailing space. If no content follows, the space will be omitted.
-
nl
JHtmlComment nl()
Add a newline.
-
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.
-
docRoot
JHtmlComment docRoot()
Add the{@docRoot}
tag at this position.
-
p
JHtmlComment p()
Add a paragraph separator.- Returns:
- this HTML comment
-
br
JHtmlComment br()
Add a line separator.- Returns:
- this HTML comment
-
value
JHtmlComment value(JType type, java.lang.String fieldName)
Add a@value
inline tag.- Parameters:
type
- the value typefieldName
- the value field name- Returns:
- this HTML comment
-
htmlLink
JHtmlTag htmlLink(java.lang.String url)
Add an HTML link (<a>
tag).- Parameters:
url
- the URL to link to- Returns:
- the link tag body
-
htmlTag
JHtmlTag htmlTag(java.lang.String tag, boolean newLine)
Add an HTML tag. The given tag should be a valid HTML 4 or 5 tag.- Parameters:
tag
- the HTML tagnewLine
-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
-
-