public class JDocComment extends JCommentPart implements JGenerable
A javadoc comment consists of multiple parts. There's the main part (that comes the first in in the comment section), then the parameter parts (@param), the return part (@return), and the throws parts (@throws). TODO: it would be nice if we have JComment class and we can derive this class from there.
modCount
Constructor and Description |
---|
JDocComment(JCodeModel owner) |
Modifier and Type | Method and Description |
---|---|
JCommentPart |
addDeprecated()
add an @deprecated tag to the javadoc, with the associated message.
|
JCommentPart |
addParam(JVar param)
Append a text to an @param tag.
|
JCommentPart |
addParam(String param)
Append a text to a @param tag to the javadoc
|
JCommentPart |
addReturn()
Appends a text to @return tag.
|
JCommentPart |
addThrows(Class<? extends Throwable> exception)
add an @throws tag to the javadoc
|
JCommentPart |
addThrows(JClass exception)
add an @throws tag to the javadoc
|
Map<String,String> |
addXdoclet(String name)
add an xdoclet.
|
Map<String,String> |
addXdoclet(String name,
Map<String,String> attributes)
add an xdoclet.
|
Map<String,String> |
addXdoclet(String name,
String attribute,
String value)
add an xdoclet.
|
JDocComment |
append(Object o)
Appends a new value.
|
void |
generate(JFormatter f) |
add, format
add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public JDocComment(JCodeModel owner)
public JDocComment append(Object o)
JCommentPart
JType
it will be printed as a @link tag.
Otherwise it will be converted to String via Object.toString()
.append
in class JCommentPart
public JCommentPart addParam(String param)
public JCommentPart addParam(JVar param)
public JCommentPart addThrows(Class<? extends Throwable> exception)
public JCommentPart addThrows(JClass exception)
public JCommentPart addReturn()
public JCommentPart addDeprecated()
public Map<String,String> addXdoclet(String name, Map<String,String> attributes)
public Map<String,String> addXdoclet(String name, String attribute, String value)
public void generate(JFormatter f)
generate
in interface JGenerable
Copyright © 2019 JBoss by Red Hat. All rights reserved.