1

How can I generate general comments in Javadoc to better describe a class's usage?

I want to add a section similar to the area that begins with "Linked list implementation of the List interface..." in the LinkedList class (http://docs.oracle.com/javase/6/docs/api/java/util/LinkedList.html) above the Field Summary.

4

1 回答 1

2

只需在您的类上方添加一个 javadoc ..

/**
 * Doubly-linked list implementation of the {@code List} and {@code Deque}
 * interfaces.  Implements all optional list operations, and permits all
 * elements (including {@code null}).
 *
 * ...
 * <p>This class is a member of the
 * <a href="{@docRoot}/../technotes/guides/collections/index.html">
 * Java Collections Framework</a>.
 *
 * @author  Josh Bloch
 * @see     List
 * @see     ArrayList
 * @since 1.2
 * @param <E> the type of elements held in this collection
 */
public class LinkedList<E>
    extends AbstractSequentialList<E>
    implements List<E>, Deque<E>, Cloneable, java.io.Serializable
{
 // ...
}
于 2013-10-17T17:44:50.397 回答