code pal for ABAP > Documentation > Number Interfaces Check
The Number Interfaces Check counts the number of interfaces up to a maximum. If there are too many interfaces in a class, it is probable that the single responsibility principle is violated.
This check counts INTERFACES
within a global or local, CLASS DEFINITION
or INTERFACE
.
Split the class or interface into multiple classes or interfaces which then contain less interfaces.
You can suppress Code Inspector findings generated by this check using the pseudo comment "#EC NMBR_INTERFACES
.
The pseudo comment must be placed right after the class definition header.
CLASS class_name DEFINITION. "#EC NMBR_INTERFACES
INTERFACES interface_name_one.
INTERFACES interface_name_two.
ENDCLASS.