The Response for Class metric

The Response for Class (RFC) metric is the total number of methods that can potentially be executed in response to a message received by an object of a class. This number is the sum of the methods of the class, and all distinct methods are invoked directly within the class methods. Additionally, inherited methods are counted, but overridden methods are not, because only one method of a particular signature will always be available to an object of a given class.

Note

The Response Set (RS) of a class is a set of methods that can potentially be executed by an object of that class. RFC is the count of these methods belonging to the set.

Notice that a given method is counted only once even if it is invoked many times in ...

Get Sonar Code Quality Testing Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.