1
有没有办法为accessor和mutator(getter/setter)编写javadoc注释,以避免重复关于该方法底层字段的信息?如何javadoc访问?
如:
private float value;
/**
* This value represents something.
*/
public float getValue() {
return value;
}
/**
* This value represents something.
* @param _value A new value.
*/
public float setValue (float _value) {
value = _value;
}
似乎效率低下,而且容易出错复制有关的Javadoc的getter和setter“价值”字段信息....
有关于这一主题的一些讨论[这里](http://stackoverflow.com/questions/1028967/simple-getter-setter-comments)。 – 2011-12-22 22:04:04
谢谢博。认为这是之前被问过的,但是找不到它。我投票结束了我的问题。 – ericsoco 2011-12-27 22:59:24