|
SandMark version 2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.statistics.StatisticsRecord
This class contains statistical information about one class including data about its fields, methods and the package in which it is located.
Constructor Summary | |
StatisticsRecord()
Constructs a new StatisticsRecord |
Method Summary | |
void |
addNonStaticField(java.lang.String type)
Adds a non-static field object of specified type to the collection. |
boolean |
callsDynamicMethods(java.lang.String methodName)
Returns true if the specified method calls other dynamic methods, otherwise false |
boolean |
callsStaticMethods(java.lang.String methodName)
Returns true if the specified method calls other static methods, otherwise false |
boolean |
equals(java.lang.Object o)
Returns true if this object is the same as the one to which it is being compared. |
java.util.Hashtable |
getByteCodeUsage(java.lang.String methodName)
|
int |
getClassHierarchyLevel()
|
java.lang.String |
getClassName()
Returns the name of this class. |
java.util.List |
getMethodByteCodes(java.lang.String methodName)
Returns a List of the bytecodes in the specied method. |
java.lang.String |
getMethodByteCodeUsage(java.lang.String methodName)
|
java.lang.String[] |
getMethodNames()
Retruns the names of all of the methods in the class specified |
int |
getMethodSize(java.lang.String methodName)
Returns the size of the given method in bytes |
java.util.List |
getNonStaticFields()
Returns a List of all the Non-Static fields in the specified class. |
int |
getNumberMethods()
Returns the number of methods which this method contains |
int |
getNumberOfApiCalls(java.lang.String methodName)
'method internals' implementation starts here .... |
int |
getNumberOfClassMethods()
|
int |
getNumberOfInstanceMethods()
|
int |
getNumberOfInstanceVariables()
|
int |
getNumberOfMessageSends(java.lang.String methodName)
|
int |
getNumberOfMethodParams(java.lang.String methodName)
|
int |
getNumberOfPublicMethods()
|
int |
getNumberOfStatementsInMethod(java.lang.String methodName)
'method size' implementation starts here .... |
int |
getNumNonBasicFields()
Returns the number of non-basic fields that this class contains. |
int |
getNumNonStatFieldsByType(java.lang.String type)
Returns the number of non-static fields in this class that are of the specified type. |
int |
getNumNonStaticFields()
Returns the number of non-static fields in this class. |
int |
getNumStaticFields()
Returns the number of static fields in this class. |
java.lang.String |
getPackageName()
Returns the name of the package to which this class belongs. |
boolean |
hasBackwardBranch(java.lang.String methodName)
Returns true if there is a backward branch instruction in the method specified. |
boolean |
hasForwardBranch(java.lang.String methodName)
Returns true if there is a forward branch instruction in the method specified. |
void |
setClassHierarchyLevel(int hierarchyLevel)
'class hierarchy' implementation starts here .... |
void |
setClassName(java.lang.String name)
Sets the class name associated with this record to the one provided. |
void |
setMethods(EDU.purdue.cs.bloat.editor.MethodEditor[] methods)
Sets the methods in this class to the specified array of MethodEditor objects. |
void |
setNumberOfInstanceMethods(int numMethods)
|
void |
setNumberOfPublicMethods(int numMethods)
'class size' implementation starts here .... |
void |
setNumNonBasicFields(int numNonBasic)
Sets the number fields with non-basic types to the specified number |
void |
setNumStaticFields(int number)
Sets the number of static fields to the specified number. |
void |
setPackageName(java.lang.String toSet)
Sets the package name of this class to the specified argument. |
boolean |
throwsCatchesExc(java.lang.String methodName)
Returns true if this method throws or catches exceptions, otherwise it returns false. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StatisticsRecord()
Method Detail |
public void setClassName(java.lang.String name)
name
- the name of the classpublic java.lang.String getClassName()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String getPackageName()
public void setPackageName(java.lang.String toSet)
toSet
- the name of the package this class to which this class it to be set.public int getMethodSize(java.lang.String methodName)
methodName
- the name of the method
public boolean throwsCatchesExc(java.lang.String methodName)
methodName
- the name of the method
public int getNumNonStaticFields()
public java.util.List getNonStaticFields()
List
of all the Non-Static fields in the specified class.
List
representation of all non-static field types in the
specified classpublic void addNonStaticField(java.lang.String type)
type
- the type of non-static field to add.public void setNumStaticFields(int number)
number
- the number of static fields to acknowledge.public int getNumStaticFields()
public void setNumNonBasicFields(int numNonBasic)
numNonBasic
- the number of fields of non-basic typepublic int getNumNonBasicFields()
public int getNumberMethods()
public void setMethods(EDU.purdue.cs.bloat.editor.MethodEditor[] methods)
methods
- the array of MethodEditor objects to add.public java.lang.String[] getMethodNames()
public java.util.List getMethodByteCodes(java.lang.String methodName)
List
of the bytecodes in the specied method.
methodName
- the name of the method from which to draw the bytecodes.
List
of the bytecodes in the specied method.public java.lang.String getMethodByteCodeUsage(java.lang.String methodName)
public java.util.Hashtable getByteCodeUsage(java.lang.String methodName)
public int getNumNonStatFieldsByType(java.lang.String type)
type
- type to count.
public boolean hasForwardBranch(java.lang.String methodName)
methodName
- the name of the method to inspect.
public boolean hasBackwardBranch(java.lang.String methodName)
methodName
- the name of the method to inspect.
public boolean callsStaticMethods(java.lang.String methodName)
methodName
- the name of the method to investigate
public boolean callsDynamicMethods(java.lang.String methodName)
methodName
- the name of the method to investigate
public int getNumberOfStatementsInMethod(java.lang.String methodName)
public int getNumberOfMessageSends(java.lang.String methodName)
public void setNumberOfPublicMethods(int numMethods)
public int getNumberOfPublicMethods()
public void setNumberOfInstanceMethods(int numMethods)
public int getNumberOfInstanceMethods()
public int getNumberOfInstanceVariables()
public int getNumberOfClassMethods()
public int getNumberOfApiCalls(java.lang.String methodName)
public int getNumberOfMethodParams(java.lang.String methodName)
public void setClassHierarchyLevel(int hierarchyLevel)
public int getClassHierarchyLevel()
|
SandMark version 2.0 Mon Jun 17 12:30:47 MST 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |