Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Find All Methods Returning Type in Javadoc?

Tags:

java

javadoc

I am using a large and unfamiliar API and would like to find all the ways of obtaining a particular class or interface. Is there a way in Javadocs to find all the methods that return such a type? If not, what are some good ways? (I'm using IntelliJ.)

like image 282
Jim L. Avatar asked Dec 10 '25 18:12

Jim L.


2 Answers

In the standard Javadoc layout, you cannot do that specifically.

However, you can find all usages of a particular class, provided you are on the javadoc page for that class: at the top of the page, you have a set of links; one of them is called Use (it's right next to Class). It will indeed list all the uses of that class, whether it be as a return value or as an argument.

In IDEA itself, if you have the cursor on the class you want, you can press Alt+F7, you'll have the option to search for the uses of a particular class in your project, or your project PLUS the libraries you depend upon.

like image 93
fge Avatar answered Dec 13 '25 07:12

fge


If you are using IntelliJ, for finding a particular Class, you can use Ctrl+N to find any class you have in your project. To find all methods that return a type, I would go with Find Usages option, Alt+F7. You can refine your results afterward.

Additionally, if you have a lengthy class open in your editor, you can use Ctrl-F12 to open the File Structure view. Start typing the returning type you are looking for, you will get a shorter list of potential methods you want.

like image 28
aperez Avatar answered Dec 13 '25 07:12

aperez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!