Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Javadoc tag @inheritDoc

Thread view: 
Maneesh - 21 Aug 2007 01:13 GMT
I am encountring a strange problem. This is my sample javadoc comment
above the method :

        /**
         * This is a sample JAVA Doc class.
         * @inheritDoc IDoc#getInboundChannel()
         */

I am using Eclipse3.2, if I mouse over IDOC I get the java doc as the
tool tip, but if I mouse over the getInboundChannel(), the javadoc
comments are not visible.

If I replace @inheritDoc tag with @see tag, the javadoc comments are
visible for mouse over on getInboundchannel() as well.

Any pointers, what can be wrong with the usage of @inheritDoc.
Owen Jacobson - 21 Aug 2007 05:02 GMT
> I am encountring a strange problem. This is my sample javadoc comment
> above the method :
[quoted text clipped - 12 lines]
>
> Any pointers, what can be wrong with the usage of @inheritDoc.

@inheritDoc doesn't do what you think it does.  From the manual at
<http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/
javadoc.html#{@inheritDoc}>:

--
{@inheritDoc}
Inherits (copies) documentation from the "nearest" inheritable class
or implementable interface into the current doc comment at this tag's
location. This allows you to write more general comments higher up the
inheritance tree, and to write around the copied text.
This tag is valid only in these places in a doc comment:

In the main description block of a method. In this case, the main
description is copied from a class or interface up the hierarchy.
In the text arguments of the @return, @param and @throws tags of a
method. In this case, the tag text is copied from the corresponding
tag up the hierarchy.
See Automatic Copying of Method Comments for a more precise
description of how comments are found in the inheritance hierarchy.
Note that if this tag is missing, the comment is or is not
automatically inherited according to rules described in that section.
--

inheritDoc does not take a class or member name as an argument: it
inherits the document from the parent class's method of the same
name.  That's all it does.  Use @see or {@link} for what you're trying
to do.

Owen


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.