JDK-4706525 : Doclet API: Extend Doclet API with holder() method in Tag interface
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: other,windows_nt
  • CPU: generic,x86
  • Submitted: 2002-06-21
  • Updated: 2014-05-05
  • Resolved: 2002-12-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
1.4.2 mantisFixed
Add the following method to com.sun.javadoc.Tag:

public Doc holder();

This method would return the Doc element that holds the tag.  
It would be useful to have a holder() method in the Tag interface because it
would give taglets access to the Doc object that holds the tag.  This makes
taglets such as {@inheritDoc} easier to write.  The {@inheritDoc} taglet
illustrates that it is sometimes necessary to access the holder to perform
the required operations.

Other Doclet API changes will be needed to support generics, which is in 
a separate RFE.

Name: rmT116609			Date: 10/31/2002

The interface com.sun.javadoc.Tag provides methods to retrieve the name and the text of a custom tag. But there is no method to obtain the class or method where the tag was written. The position does not help very much.

If you look at the implementation of the class com.sun.tools.javadoc.TagImpl you see that in a com.sun.tools.javadoc.DocImpl object is passed to the

I suggest to extend the interface com.sun.javadoc.Tag by the method holder() which returns an object of class com.sun.javadoc.Doc.

I did this for an internal project by decompiling the TagImpl class and building a new tools.jar and it helped me a lot.

Modify the implemenation of TagImpl in the tools.jar (see description for details).
(Review ID: 166297)

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b05

EVALUATION Straightforward and necessary. ###@###.### 2002-06-21 We have been cleared by the Tiger planning committee to pursue this feature. ###@###.### 2002-08-09 I have added the holder method to the Tag interface. Although this RFE has been approved for Tiger I hope that we can integrate this new method into Mantis. It is very straight forward and would be userful taglet writing. There are many taglets that take a Doc object as a parameter. With this holder() method, is is no longer necessary to have that parameter. ###@###.### 2002-08-19 PIT reports that this bug has not been fixed on windows 2000. -- iag@sfbay 2002-10-23 I deleted the shell script based regression test and rewrote the test in Java. The test now runs properly on Windows. ###@###.### 2002-11-04

PUBLIC COMMENTS I have added the holder method to the Tag interface. ###@###.### 2002-08-19