编写注释生成javadoc HTML文档

王朝html/css/js·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

/**

* The <code>Bar</code> component doesn't do mUCh of anything. It is just

* meant to demonstrate Javadoc.

* <p>

*

* @version 2.4

* @author John Zukowski

*/

public class Bar {

/**

* A specific type of foo

*/

public static final int FOO_TYPE = 0;

/**

* Another specific type of foo

*/

public static final int ANOTHER_FOO_TYPE = 1;

/**

* The current foo type

*/

private int type;

/**

* Constructs a Bar

*/

public Bar() {

type = FOO_TYPE;

}

/**

* Returns current foo type

*

* @return current foo type

* @deprecated As of version 2.3, use {@link #getFoo() getFoo()}instead

*/

public int foo() {

return getFoo();

}

/**

* Returns current foo type

*

* @return current foo type

* @since V2.3

*/

public int getFoo() {

return getFoo();

}

/**

* Changes current foo type

*

* @param type

* new type of foo

* @throws IllegalArgumentException

* When type invalid

*/

public void setFoo(int newValue) {

if ((newValue != FOO_TYPE) && (newValue != ANOTHER_FOO_TYPE)) {

throw new IllegalArgumentException("Bad type");

}

type = newValue;

}

/**

* Placeholder method for see tags

*

* @see Bar#FOO_TYPE

* @see Bar#getFoo()

* @see #getFoo()

* @see "My Book"

* @see <a href="http://www.jguru.com">jGuru </a>

*/

public void myVoid() {

}

}

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航