| Info |
|---|
| icon | false |
|---|
| title | Table of Contents |
|---|
|
|
What is RFC?
RFC stands for Response For Class. RFC measures the complexity of the class in terms of method calls.
...
| Code Block |
|---|
| linenumbers | true |
|---|
| language | java |
|---|
|
public class ClassA
{
private ClassB classB = new ClassB(); // call (constructor of class B) => +1
public void doSomething(){ // method declaration => +1
System.out.println ( "doSomething"); // call (System.out.println) => +1
}
public void doSomethingBasedOnClassB(){ // method declaration => +1
System.out.println (classB.toString()); // call (System.out.println) => 0 because already counted on line 5 + call (toString) => +1
}
}
// default constructor of ClassA => +1
// RFC = 6 |
How to Hunt for Bad RFC?
Add the Chidamber & Kemerer widget on your dashboard:
...