javadoc的使用
一个例子:
运行:
package P1;/** * An <code>Attr</code> object defines an attribute as a * name/value pair, where the name is a <code>String</code> * and the value an arbitrary <code>Object</code>. * * @version 1.1 * @author Alan * @since 1.0 */public class Attr {/** The attribute name. */private final String name;/** The attribute value. */private Object value = null;/** * Creates a new attribute with the given name and an * initial value of <code>null</code>. * @see Attr#Attr(String,Object) */public Attr(String name) {this.name = name;}/** * Creates a new attribute with the given name and * initial value. * @see Attr#Attr(String) */public Attr(String name, Object value) {this.name = name;this.value = value;}/** Returns this attribute's value. */public Object getValue() {return value;}/** * Sets the value of this attribute . Changes the * value returned by calls to {@link #getValue()}. * @param newValueThe new value for the attribute. * @returnThe original value. * @see #getValue() */public Object setValue(Object newValue) {Object oldVal = value;value = newValue;return oldVal;}/** * Returns a string of the form <code>name=value</code>. */public String toString() {return name + "='" + value + "'";}}?
?
另外:eclipse中可以只用导出javadoc。
?
写道使用eclipse生成文档(javadoc)主要有三种方法:?