|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.spinellis.ckjm.ClassMetrics
public class ClassMetrics
Store details needed for calculating a class's Chidamber-Kemerer metrics. Most fields in this class are set by ClassVisitor. This class also encapsulates some policy decision regarding metrics measurement.
ClassVisitor
Constructor Summary | |
---|---|
ClassMetrics()
Default constructor. |
Method Summary | |
---|---|
void |
addAfferentCoupling(java.lang.String name)
Add a class to the set of classes that depend on this class |
int |
getCa()
Return the class's afferent couplings metric |
int |
getCbo()
Return the coupling between object classes metric |
int |
getDit()
Return the depth of the class's inheritance tree |
int |
getLcom()
Return the class's lack of cohesion in methods metric |
int |
getNoc()
Return the number of children |
int |
getNpm()
Return the number of public methods metric |
int |
getRfc()
Return the Response for a Class |
int |
getWmc()
Return the weighted methods per class metric |
void |
incNoc()
Increment the number of children |
void |
incNpm()
Increment the number of public methods count |
void |
incWmc()
Increment the weighted methods count |
static boolean |
isJdkClass(java.lang.String s)
Return true if the class name is part of the Java SDK |
boolean |
isPublic()
Return true if the class is public |
boolean |
isVisited()
Return true if the class has been visited by the metrics analyzer. |
void |
setCbo(int c)
Set the coupling between object classes metric |
void |
setDit(int d)
Set the depth of inheritence tree metric |
void |
setLcom(int l)
Set the class's lack of cohesion in methods metric |
void |
setPublic()
Call to set the class as public |
void |
setRfc(int r)
Increment the Response for a Class |
void |
setVisited()
Mark the instance as visited by the metrics analyzer |
java.lang.String |
toString()
Return the 6 CK metrics plus Ce as a space-separated string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
ClassMetrics()
Method Detail |
---|
public void incWmc()
public int getWmc()
public void incNoc()
public int getNoc()
public void setRfc(int r)
public int getRfc()
public void setDit(int d)
public int getDit()
public void setCbo(int c)
public int getCbo()
public int getLcom()
public void setLcom(int l)
public int getCa()
public void addAfferentCoupling(java.lang.String name)
public void incNpm()
public int getNpm()
public boolean isPublic()
public void setPublic()
public static boolean isJdkClass(java.lang.String s)
public java.lang.String toString()
toString
in class java.lang.Object
public void setVisited()
public boolean isVisited()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |