Comments on @Override Methods

My question is not a programming problem.

I have to comment on my code for JavaDoc, but it seems a little strange to me to comment on existing methods (I think of @Override methods).

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

+6
source share
2 answers

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

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

+13
source

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

You can also add additional help comments after or before this tag. Here is an example of 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; } 
+8
source

Source: https://habr.com/ru/post/889847/


All Articles