Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comments on @Override methods

My question is not really a programming problem..

I must comment my code for the JavaDoc, but I think it's a bit strange to re-comment existing methods (I think about @Override methods).

For example, I override the method onListItemClick, is there a solution to "redirect" the user to the comment of the overridden method?

like image 458
Greg Avatar asked Jun 06 '11 07:06

Greg


2 Answers

Use: /** {@inheritDoc} */ or {@link package.class#member label}

http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/javadoc.html#{@inheritDoc}

like image 173
Op De Cirkel Avatar answered Sep 20 '22 02:09

Op De Cirkel


Try {@inheritDoc} attribute. This should do what you need.

You also can add some additional help comments after or before this tag. Here is an example from android source code:

/**
 * {@inheritDoc}
 *
 * Note that if you're calling on a local binder, this always returns true
 * because your process is alive if you're calling it.
 */
public boolean isBinderAlive() {
    return true;
}
like image 27
inazaruk Avatar answered Sep 24 '22 02:09

inazaruk