|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ikokoon.serenity.Collector
public class Collector
TODO - make this class non static? Is this a better option? More OO? Better performance? Will it be easier to understand? In the case of distributing the collector class by putting it in the constant pool of the classes and then calling the instance variable from inside the classes, will this be more difficult to understand? In this static class all the real collection logic is in one place and is called statically. The generation of the instructions to call this class is simple and seemingly not much less performant than an instance variable. This class collects the data from the processing. It adds the metrics to the packages, classes, methods and lines and persists the data in the database. This is the central collection class for the coverage and dependency functionality.
| Field Summary |
|---|
| Fields inherited from interface com.ikokoon.serenity.IConstants |
|---|
CLEAN_CLASSES, COMPLEXITY, COVERAGE, DATABASE_FILE_JPA, DATABASE_FILE_ODB, DATABASE_FILE_RAM, DEPENDENCY, EXCLUDED_PACKAGES_PROPERTY, INCLUDED_ADAPTERS_PROPERTY, INCLUDED_JARS_PROPERTY, INCLUDED_PACKAGES_PROPERTY, JAVA_CLASS_PATH, LOG_4_J_PROPERTIES, PROFILING, SERENITY_DIRECTORY, SERENITY_PERSISTENCE_UNIT, SERENITY_SOURCE, SUREFIRE_TEST_CLASS_PATH, WRITE_CLASSES |
| Constructor Summary | |
|---|---|
Collector()
|
|
| Method Summary | |
|---|---|
static void |
collectAccess(java.lang.String className,
java.lang.Integer access)
Adds the access attribute to the class object. |
static void |
collectAccess(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
java.lang.Integer access)
Adds the access attribute to the method object. |
static void |
collectComplexity(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
double complexity)
This method is called after each jumps in the method graph. |
static void |
collectCoverage(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
int lineNumber)
This method accumulates the number of times a thread goes through each line in a method. |
static void |
collectEfferentAndAfferent(java.lang.String className,
java.lang.String... targetClassNames)
Collects the packages that the class references and adds them to the document. |
static void |
collectInnerClass(java.lang.String innerName,
java.lang.String outerName)
Collects the inner class for a class. |
static void |
collectLines(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
java.lang.Integer lineNumber)
This method just collects all the lines in the project. |
static void |
collectOuterClass(java.lang.String innerName,
java.lang.String outerName,
java.lang.String outerMethodName,
java.lang.String outerMethodDescription)
Collects the outer class of an inner class. |
static void |
collectSource(java.lang.String className,
java.lang.String source)
This method collects the Java source for the class. |
protected static Line<?,?> |
getLine(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
double lineNumber)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Collector()
| Method Detail |
|---|
public static final void collectCoverage(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
int lineNumber)
className - the name of the class that is calling this methodmethodName - the name of the method that the line is inmethodDescription - the description of the methodlineNumber - the line number of the line that is calling this method
public static final void collectLines(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
java.lang.Integer lineNumber)
className - the name of the class that is calling this methodlineNumber - the line number of the line that is calling this methodmethodName - the name of the method that the line is inmethodDescription - the description of the method
public static final void collectSource(java.lang.String className,
java.lang.String source)
className - the name of the classsource - the source for the class
public static final void collectComplexity(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
double complexity)
className - the name of the class the method is inmethodName - the name of the methodmethodDescription - the methodDescriptionription of the methodcomplexity - the complexity of the method
public static final void collectEfferentAndAfferent(java.lang.String className,
java.lang.String... targetClassNames)
className - the name of the classestargetClassNames - the referenced class names
public static final void collectAccess(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
java.lang.Integer access)
className - the name of the classmethodName - the name of the methodmethodDescription - the description of the methodaccess - the access opcode associated with the method
public static final void collectAccess(java.lang.String className,
java.lang.Integer access)
className - the name of the classaccess - the access opcode associated with the class
public static final void collectInnerClass(java.lang.String innerName,
java.lang.String outerName)
innerName - the name of the inner classouterName - the name of the outer class
public static final void collectOuterClass(java.lang.String innerName,
java.lang.String outerName,
java.lang.String outerMethodName,
java.lang.String outerMethodDescription)
innerName - the name of the inner classouterName - the name of the outer classouterMethodName - the method name in the case this is an in-method class definitionouterMethodDescription - the description of the method for anonymous and inline inner classes
protected static final Line<?,?> getLine(java.lang.String className,
java.lang.String methodName,
java.lang.String methodDescription,
double lineNumber)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||