|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cyvis.core.metrics.ClassMetric
public class ClassMetric
Metrics extracted from a class. Contains some metadata about the class, and a
collection of MethodMetric
objects.
Field Summary | |
---|---|
String |
className
|
String |
packageName
|
int |
size
|
Constructor Summary | |
---|---|
ClassMetric(InputStream classFile)
Extracts metrics for the class (including the methods it contains) from the given class file. |
Method Summary | |
---|---|
void |
generateText(Writer out)
Generates a fragment of a plain-text report for this class's metrics. |
MethodMetric |
getMethodMetric(String methodName)
Finds and returns an MethodMetric Object given the name of the method. |
Iterator<MethodMetric> |
iterator()
|
int |
maxCC()
returns the maximum cyclomatic complexity of the methods in this |
int |
methodCount()
Returns the number of methods in this class. |
Iterable<MethodMetric> |
reversed()
Allows iteration across this class's methods in reverse order. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final String className
public final String packageName
public final int size
Constructor Detail |
---|
public ClassMetric(InputStream classFile) throws IOException
IOException
Method Detail |
---|
public MethodMetric getMethodMetric(String methodName)
methodName
- the name of the method that has to be found.
public int methodCount()
public int maxCC()
public Iterator<MethodMetric> iterator()
iterator
in interface Iterable<MethodMetric>
public Iterable<MethodMetric> reversed()
public void generateText(Writer out) throws IOException
ProjectMetric.generateText(Writer)
.
out
- Writer to which the report fragment is written
IOException
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |