Top Description Fields Constructors Methods
com.sun.codemodel

public Class JCommentPart

extends ArrayList<Object>
Class Inheritance
Known Direct Subclasses
com.sun.codemodel.JDocComment
Imports
com.sun.codemodel.util.Util, java.util.ArrayList, .Collection, .Iterator

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 a String via the Object#toString() method, or a Collection/array of those objects.

Values can be added through the various append methods one by one or in a bulk.

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public boolean
add(Object o)

Overrides java.util.ArrayList.add.

Implements java.util.List.add, java.util.Collection.add.

Appends the specified element to the end of this list.

public JCommentPart
append(Object o)

Appends a new value.

public JCommentPart
appendXML(String s)

Appends a new value with escaped XML.

private String
escape(String s)

Escapes the appearance of the comment terminator.

private void
protected void
format(JFormatter f, String indent)

Writes this part into the formatter by using the specified indentation.

Inherited from java.util.ArrayList:
addaddAlladdAlladdFirstaddLastclearclonecontainsensureCapacityequalsforEachgetgetFirstgetLasthashCodeindexOfisEmptyiteratorlastIndexOflistIteratorlistIteratorremoveremoveremoveAllremoveFirstremoveIfremoveLastremoveRangereplaceAllretainAllsetsizesortspliteratorsubListtoArraytoArraytrimToSize

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.ArrayList.serialVersionUID.

Constructor Detail

JCommentPartback to summary
protected JCommentPart()

Method Detail

addback to summary
public boolean add(Object o)

Overrides java.util.ArrayList.add.

Implements java.util.List.add, java.util.Collection.add.

Doc from java.util.ArrayList.add.

Appends the specified element to the end of this list.

Annotations
@Override
appendback to summary
public JCommentPart append(Object o)

Appends a new value. If the value is JType it will be printed as a @link tag. Otherwise it will be converted to String via Object#toString().

appendXMLback to summary
public JCommentPart appendXML(String s)

Appends a new value with escaped XML. If the value is JType it will be printed as a @link tag. Otherwise it will be converted to String via Object#toString().

escapeback to summary
private String escape(String s)

Escapes the appearance of the comment terminator.

flattenAppendback to summary
private void flattenAppend(Object value)
formatback to summary
protected void format(JFormatter f, String indent)

Writes this part into the formatter by using the specified indentation.