Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

copy all method names - Intellij

IntelliJ editing question: If am editing a java file, is there way to copy all method names and arguments into clipboard?

Some thing like this...

java.lang.String.length():int
java.lang.String.charAt(int):char
java.lang.String.codePointAt(int):int
java.lang.String.codePointBefore(int):int
java.lang.String.codePointCount(int, int):int
java.lang.String.offsetByCodePoints(int, int):int

Copying from 'Structure' does copy all(or selected) method names.. but that does not include classname.

like image 965
Jayan Avatar asked Jan 09 '12 12:01

Jayan


People also ask

How do I get a list of methods in IntelliJ?

By default, IntelliJ IDEA shows all classes, methods, and other elements of the current file. To toggle the elements you want to show, click the corresponding buttons on the Structure tool window toolbar.

How do I copy a fully qualified class name in IntelliJ?

Press Ctrl + Alt + Shift + C (Edit | Copy Reference) on "Editor" in the code and you'll have the fully-qualified name in your clipboard. Or alternatively just right-click on the code and select "Copy Reference".

How do I copy classpath in IntelliJ?

Ctrl + Shift + C works on Windows, even if your focus is on the editor.

How do I duplicate a package in IntelliJ?

To duplicate and rename the package, you should not select the package itself, i.e. v2 , but select all the classes and subpackages the package contains. Then press ⌘C,⌘V or F5 as before.


2 Answers

If you are interested in just names of the methods

  1. Go to structure view
  2. Select all
  3. Right click to copy
like image 82
Kiran Avatar answered Oct 23 '22 13:10

Kiran


I do not know how to do it with InteliJ but I can suggest you to use javap - utility that is included into your jdk. Just run it from command line and specify the class name. It prints "prototype" of java class; something like .h file in c.

I hope this helps.

like image 28
AlexR Avatar answered Oct 23 '22 13:10

AlexR