Is there a standard or best practice for writing javadocs for Java/JVM language methods which contain side effects?
I have a void method defined, which modifies one of the method parameters, but do not know how to document the actual return value (since there is no actual return).
/**
* @param obj - reference object
* @return obj - obj.name is changed to 'hello' //TODO figure out javadoc annotation
*/
void methodName(Object obj) {
if (obj != null) {
obj.name = "hello";
}
}
It just seems that there is no good way to tag the side effects on the object, since the @param and @return annotations do not really dictate what is going on.