Questions tagged [taglet]

Taglets are Java programms that implement the taglet Interface used to export custom javadoc tags.

See the Oracle reference.

see also

17 questions
9
votes
1 answer

JDK 1.7 allows custom taglets with names *starting* with a dot. JDK 1.8 forbids it?

I've written a custom taglet library with names that start with a dot: .codelet, .codelet.and.out, etcetera. It is compiled with JDK 7. When generating JavaDoc using the 1.7 javadoc.exe, it works fine. But when generating it with JDK 8, it fails…
aliteralmind
  • 19,847
  • 17
  • 77
  • 108
7
votes
1 answer

How to make inline taglets (which require com.sun) more cross-platform? Is there a non-Oracle/more-cross-platform javadoc parser?

I'm writing a library that inserts already unit-tested example code (its source-code, output, and any input files) into JavaDoc, with lots of customization possibilities. The main way of using this library is with inline taglets, such…
aliteralmind
  • 19,847
  • 17
  • 77
  • 108
6
votes
1 answer

Accessing Java annotations from a Taglet

I'm working on a project where we have some custom Taglet classes that are used to modify the Javadocs (such as linking to source code in SVN, adding citations) and so on.One of the things we'd like to do is to be able to get the annotations that…
Rajarshi Guha
5
votes
2 answers

Expand inline tags in custom Javadoc taglet

I wrote a custom Javadoc taglet that adds a new note tag: ... public boolean isInlineTag() { return false; } public String toString(Tag tag) { return "
" + tag.text() + "
"; } It works so far, but inline tags are…
Mark
  • 1,447
  • 2
  • 14
  • 26
4
votes
1 answer

Loading the class in a custom JavaDoc Taglet?

I am writing a custom JavaDoc Taglet, and want to load and create an instance of the class for which the JavaDoc is being processed. This is the code I have (public class CDKIOOptionsTaglet implements Taglet): public String toString(Tag tag) { …
Egon Willighagen
  • 1,621
  • 4
  • 19
  • 36
2
votes
1 answer

Javadoc custom taglets in Java 11

Is it possible to create programmatic taglets in Java 11 anymore? It appears com.sun.tools.doclets.Taglet has been removed after Java 8 and any documentation I find online for creating taglets refer exclusively to Java 8. I've been stuck using…
2
votes
0 answers

Maven Javadoc Plugin not finding custom taglets

I created some custom JavaDoc Taglets as described here: http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/taglet/overview.html They work correctly with the Maven Javadoc Plugin when I manually specify the Taglets classes: …
jamp
  • 2,159
  • 1
  • 17
  • 28
1
vote
2 answers

How to get value of {@docroot} in a com.sun.javadoc.Taglet?

I'm writing a custom taglet for inclusion of a mathML file in a javadoc html file. I would like to store all my *.mml files in the same folder, possibly in the {@docroot}/doc-files folder. My question is : how can I know the value of the @docRoot…
Sebastien
  • 246
  • 1
  • 12
1
vote
1 answer

Ant JavaDoc task throwing `NoClassDefFoundError` from within a custom taglet, even though the class *is* on the classpath

I am having trouble with a JavaDoc Ant task. It's giving me a java.lang.NoClassDefFoundError for a class that, as far as I can tell, is definitely on the classpath. According to the documentation, a NoClassDefFoundError is thrown when the class…
aliteralmind
  • 19,847
  • 17
  • 77
  • 108
1
vote
1 answer

How to use Taglet or Tag in Eclipse with Java

I'm trying to use the Taglet or Tag for my project because I need to create new kind of tags in my javadoc. But I'm not finding any example useful to start. What do I need to know is if exist any good example of the usage. I'm not finding videos…
DTondin
  • 147
  • 1
  • 2
  • 9
0
votes
1 answer

Using a taglet with Javadoc in Netbeans

I've written a custom taglet, compiled it and am now trying to use it but keep getting a ClassNotFoundException when I try to run it with javadoc: javadoc: error - Error - Exception java.lang.ClassNotFoundException thrown while trying to register…
Michael Berry
  • 70,193
  • 21
  • 157
  • 216
0
votes
1 answer

with maven-javadoc-plugin, how to load the class that taglet reference is contained within?

I've developed a custom javadoc taglet that uses reflection through an API to get information about the class the taglet is referenced within. It loads the class with "Class.forName(String)". I was able to get this to work in the project for the…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
0
votes
1 answer

How to register multiple instances of custom doclets with configuration differences

I'm writing a custom Javadoc doclet to print a table of javax.validation constraints for the containing class. It basically works, but I'm finding the Doclet framework is pretty restrictive and inflexible. For background, it's very possible that a…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
0
votes
1 answer

How to prevent configuration file from repeatedly reloading? Holding it statically is not working

I'm writing a taglet-based library, which, when the first taglet is found, loads some configuration (starting with a text-file filled with properties). The configuration object is being held statically directly in each Taglet object, but it seems…
aliteralmind
  • 19,847
  • 17
  • 77
  • 108
0
votes
1 answer

How can a taglet know about the class it's located in?

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…
aliteralmind
  • 19,847
  • 17
  • 77
  • 108
1
2