Package com.sun.codemodel
Class JCommentPart
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<java.lang.Object>
-
- com.sun.codemodel.JCommentPart
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<java.lang.Object>
,java.util.Collection<java.lang.Object>
,java.util.List<java.lang.Object>
,java.util.RandomAccess
- Direct Known Subclasses:
JDocComment
public class JCommentPart extends java.util.ArrayList<java.lang.Object>
A part is a part of a javadoc comment, and it is a list of values.A part can contain a free-form text. This text is modeled as a collection of 'values' in this class. A value can be a
JType
(which will be prinited with a @link tag), anything that can be turned into aString
via theObject.toString()
method, or aCollection
/array of those objects.Values can be added through the various append methods one by one or in a bulk.
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JCommentPart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(java.lang.Object o)
JCommentPart
append(java.lang.Object o)
Appends a new value.protected void
format(JFormatter f, java.lang.String indent)
Writes this part into the formatter by using the specified indentation.-
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Method Detail
-
append
public JCommentPart append(java.lang.Object o)
Appends a new value. If the value isJType
it will be printed as a @link tag. Otherwise it will be converted to String viaObject.toString()
.
-
add
public boolean add(java.lang.Object o)
- Specified by:
add
in interfacejava.util.Collection<java.lang.Object>
- Specified by:
add
in interfacejava.util.List<java.lang.Object>
- Overrides:
add
in classjava.util.ArrayList<java.lang.Object>
-
format
protected void format(JFormatter f, java.lang.String indent)
Writes this part into the formatter by using the specified indentation.
-
-