I'm looking for a way to fetch all the javadoc for all methods with a specific Annotation, at runtime. I'm going to use this javadoc to display details about these methods in a custom made UI.
These methods are later used for testing, they will be invoked in an unknown order, determined by the user - I wish to let the user see the javadoc without having to browse the sources.
Yes, I have the sources and can use them to achieve the goal.
The best way I thought about doing this is maintaining a separate file with descriptions, which will be read on runtime, but that means I have to maintain both javadoc and the external file, and I don't like the idea of maintaining two copies of the pretty similar text.
Cheers for any answers! Thanks.
This isn't as simple as it sounds because the JavaDoc isn't part of the class file (there is no getJavaDoc()
method on java.lang.reflect.Method
).
I'd attack the problem like this:
org.eclipse.jdt.core_*.jar
to your classpath. "Using the batch compiler" might also help).AstVisitor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With