Inspectopedia Help

Anonymous inner class with too many methods

Reports anonymous inner classes whose method count exceeds the specified maximum.

Anonymous classes with numerous methods may be difficult to understand and should be promoted to become named inner classes.

Use the Method count limit field to specify the maximum allowed number of methods in an anonymous inner class.

Inspection options

Option

Type

Default

Method count limit

Number

1

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023