Access Java Annotations from Taglet

I am working on a project where we have some custom Taglet classes that are used to modify Javadocs (for example, source code links in SVN, adding quotes), etc. One of the things that we would like to do is to be able to receive annotations that are used in the source and manipulate information from them.

The Taglet interface does not seem to provide an easy way to access annotations in the Java source code. Does anyone know if this is possible at all?

I am using JDK 1.5

+6
java annotations javadoc taglet
source share
1 answer

If your taglet is called from a standard doclet, you can access its internal state:

import com.sun.tools.doclets.standard.Standard; ClassDoc currentcd = Standard.htmlDoclet.configuration.currentcd; 

I wrote a Taglet that uses this method, but it is sure that it is not very ,-)

+3
source share

All Articles