As far as I can see the taglet api has exactly one class in its package: Taglet
, if you change Taglet.html
to package-summary.html
, there's nothing else in it (and there's this mildly scary message:
As of JDK version 1.5, replaced by
com.sun.tools.doclets.internal.toolkit.util.
which I'm assuming that does not affect the Taglet
interface itself.)
There is nothing in the interface that knows anything about the class in which the taglet resides--nothing about its context.
Is there anyway to get the name of the class in which the taglet is being "called" from? The class that has the JavaDoc block in which {@.myTaglet}
exists?
As a hack, I'm thinking of forcing the user to set it with {@.thisClass my.package.AClass}
at the top, before using any of my custom taglets.
Better ideas would be great.
(Here's Sun's taglet overview.)
(Also, please consider looking at my previous question, which is another taglet question: How to make inline taglets (which require com.sun) more cross-platform? Is there a non-Oracle/more-cross-platform javadoc parser?)