I'm trying to do something weird, I'm trying to determine how many methods has my Java application.
This weird thing has a purpose, it is because I have to improve the logging in the application, and it will require to make a revision of every method and add the logging if it is missing, update the logging if it already has.
I'm in the estimation process, so knowing how many methods has the application will help me to provide a high level estimation with a reasonable basis for this.
Then, here is the question, is there any way to know how many methods has my Java application?
Thanks in advance.
Fer
PS: I'm using Eclipse
You can open any method or type in your workspace using the "Open Type" wizard or the "Open Method" wizard. -Or- press Ctrl+Shift+T (for a type) or Ctrl+Shift+M (for a method). The "Open Type/Method" dialog will appear. If a type/method was previously selected in the editor or outline views, it will be displayed.
b) A class should contain an average of less than 30 methods, resulting in up to 900 lines of code.
Select mymethod() and press ctrl + alt + h . To see some detailed Information about any method you can use this by selecting that particular Object or method and right click.
The following limitations of the Java virtual machine are implicit in the class file format: The number of methods that may be declared by a class or interface is limited to 65535 by the size of the methods_count item of the ClassFile structure (§4.1).
Using Eclipse you can do this:
After the search is complete you should see a "XXXX declarations in..." message in the search view and that will be your result.
Hope it helps!
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