Inspectopedia Help

Class with too many methods

Reports classes whose number of methods exceeds the specified maximum.

Classes with too many methods are often trying to 'do too much'. Consider splitting such a class into multiple smaller classes.

Configure the inspection:

  • Use the Method count limit field to specify the maximum allowed number of methods in a class.

  • Use the Ignore simple getter and setter methods option to ignore simple getters and setters in method count.

  • Use the Ignore methods overriding/implementing a super method to ignore methods that override or implement a method from a superclass.

Inspection options

Option

Type

Default

Method count limit

Number

20

Ignore simple getter and setter methods

Checkbox

false

Ignore methods overriding/implementing a super method

Checkbox

false

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023