my question is should i comment like following:
/**
* Getter for {@link #auto_key}
* @return {@link #auto_key}
*/
public String getAuto_key() {
return auto_key;
}
/**
* Setter for {@link #auto_key}
* @param auto_key the {@link #auto_key} to set
*/
public void setAuto_key(String auto_key) {
this.auto_key = auto_key;
}
basically i want to ask, using {@link} in comment for getter and setter method is correct? or should i use normal comment without using {@link} ? and this way is a java standard or not ?
Actually, I deliberately don't javadoc getters and setters, because you aren't adding any value by doing so - they are what they are... accessor methods. In fact, you would be creating a kind of code bloat by adding javadoc to them.
I only put javadoc on non-getter/setters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With