Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 1.16 KB

number-interfaces.md

File metadata and controls

33 lines (20 loc) · 1.16 KB

code pal for ABAP

code pal for ABAP > Documentation > Number Interfaces Check

Number Interfaces Check

What is the Intent of the 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.

How does the check work?

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

Which attributes can be maintained?

Attributes

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?

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.