8

I am using IntelliJ IDEA.

How I can know how many methods a class has? Are there any plugins to see metrics concerning the number of methods?

CrazyCoder
405k183 gold badges1k silver badges945 bronze badges
asked Aug 29, 2012 at 22:40

1 Answer 1

10

Try the MetricsReloaded plug-in.

Help | Find Action | Calculate Metrics.

Create a new empty profile with CSO enabled — Class metrics, Class size (operations):

CSO

Run the profile, it will show the number of methods per class:

Result

You may also want to enable ISO (Interface size) metric.

answered Aug 29, 2012 at 23:12
Sign up to request clarification or add additional context in comments.

12 Comments

Sorry, but I fail to see a feature in the plugin for counting methods in a class. Where do I look?
Just Follow the instructions inside the plugin page. Then go to class matrix tab. then you can see the method count.
For future reference: Go to help -> find action -> calculate metrics. To add the method count for a specific class, click the "..." to the right of the selector. Then you find "Interface metrics" or "Class metrics" and select what you want. That might help out some people, but for me it was still very buggy. It wasn't saving all the options that I selected and I never could get the "method count" to come up.
MetricsReloaded counts lines of code and files. It does not have metrics for method/member/function counting.
@Rjak thanks for downvoting without doing any research or reading any comments. MetricsReloaded plug-in does allow to calculate the number of methods.
|

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.