Querying the metadata of Java's JDK documentation

Viewed 91

Is there any tool that allows you to "query" (rather than simply search) the JDK documentation? For example:

  • Show me all deprecated methods.
  • Show me all subclasses of a particular class (rather than only the direct subclasses, which the documentation provides).
  • Show me all methods that return (say) a Thread.
  • Show me all instances of a given method name, regardless of signature.

What prompted this question is that I was muddling up two completely unrelated methods that I only use occasionally: Pattern.matches() and Matcher.matches(). And then I found that there is also PathMatcher.matches(), which also has a completely unrelated purpose. And that got me wondering how many other "matches()" methods there are in the JDK. And then I thought that there may be other useful queries that could also be run against the JDK documentation.

The only motivation for having such a tool is to help me improve my own knowledge of Java with information that is interesting or useful (to me at least), but is not otherwise easy to obtain. This question is similar, but I am looking for something more sophisticated than a simple search.

ETA: Marcel's suggestion below of using the Doclet API provides a great solution, without too much effort.

ETA2: Re determining deprecated methods, I've just found out that Oracle already address this in the JavaDoc API here

1 Answers
Related