Rule Definition
Classes implementing more than X Interfaces are not a good practice in the application architecture.
Remediation
Review the design to reduce the number of implementations
Violation Code Sample
package diag.arch004; public class Cs_OK_3_3_i6 implements I01_20,I02_20,I03_20,I04_20,I05_20,I06_20 { public void myMethod() { } public void myMethodI01_20() { } public void myMethodI02_20() { } public void myMethodI03_20() { } public void myMethodI04_20() { } public void myMethodI05_20() { } public void myMethodI06_20() { } }
Fixed Code Sample
package diag.arch004; public class Ci_OK_2_3_i1 { public void myMethod() { } public class CInner_OK_2_3_i1 implements I01_20 { public void myMethodI01_20() { } } }
Related Technologies
JEE
Technical Criterion
Complexity - OO Inheritance and Polymorphism
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.