Skip to content

Instantly share code, notes, and snippets.

@przodownikR1
Created January 3, 2014 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save przodownikR1/8238779 to your computer and use it in GitHub Desktop.
Save przodownikR1/8238779 to your computer and use it in GitHub Desktop.
RFC sonar example
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
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment