Class AbstractJComment
java.lang.Object
org.jboss.jdeparser.AbstractJComment
- Direct Known Subclasses:
AbstractJHtmlComment, BlockJComment, InlineDocTagCommentContent, LineJComment, NestedCommentContent
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final CommentTextContent(package private) static final CommentTextContent(package private) static final InlineDocTagCommentContent(package private) static final CommentTextContent(package private) static final CommentContent(package private) static final CommentTextContent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends CommentContent>
Tadd(T item) (package private) voidaddItemDirectly(Writable item) block()Add a comment sub-block at this location.code()Add an inline code tag.docRoot()Add the{@docRoot}tag at this position.inlineDocTag(String tag) Add an inline doc tag.inlineDocTag(String tag, String body) Add an inline doc tag with simple content.linkConstructor(boolean plain, JType targetType, JType... params) Add an inline@linkto a constructor.Add an inline@linkto a field of a type.linkMethod(boolean plain, JMethodDef methodDef) Add an inline@linkto a method.linkMethod(boolean plain, JType targetType, String targetMethod, JType... params) Add an inline@linkto a method.Add an inline@linkto a type.nl()Add a newline.sp()Add a non-trailing space.Add some text to the end of this comment.Add a type name to the end of this comment.voidwrite(SourceFileWriter writer)
-
Field Details
-
NL_CONTENT
-
HASH_CONTENT
-
OPEN_PAREN_CONTENT
-
COMMA_CONTENT
-
CLOSE_PAREN_CONTENT
-
DOC_ROOT_CONTENT
-
-
-
Constructor Details
-
AbstractJComment
AbstractJComment()
-
-
Method Details
-
addItemDirectly
-
add
-
text
-
sp
-
typeName
Description copied from interface:JCommentAdd 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. -
block
Description copied from interface:JCommentAdd 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. -
inlineDocTag
Description copied from interface:JCommentAdd an inline doc tag with simple content.- Specified by:
inlineDocTagin interfaceJComment- Parameters:
tag- the tag name (without the leading@sign)body- the complete tag body- Returns:
- this comment
-
inlineDocTag
Description copied from interface:JCommentAdd an inline doc tag.- Specified by:
inlineDocTagin interfaceJComment- Parameters:
tag- the tag name (without the leading@sign)- Returns:
- the body of the doc tag
-
linkType
Description copied from interface:JCommentAdd an inline@linkto a type. -
linkField
Description copied from interface:JCommentAdd an inline@linkto a field of a type. -
linkConstructor
Description copied from interface:JCommentAdd an inline@linkto a constructor.- Specified by:
linkConstructorin interfaceJComment- Parameters:
plain-trueto render in plain font,falseto render inmonospacefonttargetType- the target type to link toparams- the argument types of the constructor to link to- Returns:
- the body of the link tag
-
linkMethod
Description copied from interface:JCommentAdd an inline@linkto a method.- Specified by:
linkMethodin interfaceJComment- Parameters:
plain-trueto render in plain font,falseto render inmonospacefonttargetType- the target type to link totargetMethod- the name of the method to link toparams- the argument types of the method to link to- Returns:
- the body of the link tag
-
linkMethod
Description copied from interface:JCommentAdd an inline@linkto a method.- Specified by:
linkMethodin interfaceJComment- Parameters:
plain-trueto render in plain font,falseto render inmonospacefontmethodDef- the method to link to- Returns:
- the body of the link tag
-
code
-
docRoot
-
nl
-
write
- Specified by:
writein interfaceWritable- Throws:
IOException
-
getContent
-