Javadoc - 如何添加关于类的一般注释?

时间:2013-10-17 17:41:16

标签: java documentation javadoc

如何在Javadoc中生成一般注释以更好地描述类的用法?

我想添加一个类似于以&#34开头的区域的部分; List接口的链接列表实现..."在“字段摘要”上方的LinkedList类(http://docs.oracle.com/javase/6/docs/api/java/util/LinkedList.html)中。

1 个答案:

答案 0 :(得分: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
{
 // ...
}