Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1.03 KB

number-interfaces.md

File metadata and controls

26 lines (16 loc) · 1.03 KB

code pal for ABAP > Documentation > Number of Interfaces Check

Number of Interfaces Check

What is the Intent of the Check?

Thhis check counts the number of interfaces up to a maximum. If there are too many interfaces in a class, it is an indicator that the single responsibility principle is violated.

How does the check work?

This check counts INTERFACES within a global or local, CLASS DEFINITION or INTERFACE.

How to solve the issue?

Split the class or interface into multiple classes or interfaces which then contain less interfaces.

What to do in case of exception?

In exceptional cases, you can suppress this finding by using the pseudo comment "#EC NMBR_INTERFACES which should be placed right after the class definition header:

CLASS class_name DEFINITION.   "#EC NMBR_INTERFACES
  INTERFACES interface_name_one.
  INTERFACES interface_name_two.
ENDCLASS.