pl.gda.pg.eti.ask.przemyslawbielicki.aeh.info
Class MethodStat

java.lang.Object
  extended bypl.gda.pg.eti.ask.przemyslawbielicki.aeh.info.MethodStat

public class MethodStat
extends Object

MethodStat contains statistics for method name methodName_.

MethodStat can be converted to XML element Element by getElement(DocumentImpl) method.

Version:
0.9
Author:
Przemyslaw Bielicki
Gdansk University of Technology
Faculty of Electronics, Telecommunication and Computer Science
Distributed Computer Systems

Field Summary
private  int correct_
          Method's correct invocation counter
private  int errors_
          Method's erroreous invocation counter
private  int exceptionsClient_
          Method's client exceptional invocation counter
private  int exceptionsServer_
          Method's server exceptional invocation counter
private  String methodName_
          Method name
private  Class[] parameters_
          Method's parameter types array
private  String[] parameterTypes_
          Method's parameter types array
private  String returnType_
          Method's return type
 
Constructor Summary
MethodStat()
          Default constructor
MethodStat(Method method)
          Constructor that creates new MethodStat instance for given method.
 
Method Summary
 boolean equals(Object o)
          Typical equals method.
 int getAllInvocations()
          Getter method for all method invocations_ number
 int getCorrect()
          Getter method for correct invocation counter
 ElementImpl getElement(DocumentImpl document)
          Retrieves XML element for current method statistics subtree.
 int getErrors()
          Getter method for erroreous invocation counter
 int getExceptionsClient()
          Getter method for client exceptional invocation counter
 int getExceptionsServer()
          Getter method for server exceptional invocation counter
 String getMethodName()
          Getter method for method name
 String[] getParameterTypes()
          Getter method for parameter types array
 String getReturnType()
          Getter method for return type
 String hashKey()
          Creates hash key for HashMap corresponding to current method statistics.
 void setCorrect(int i)
          Setter method for correct invocation counter
 void setErrors(int i)
          Setter method for erroreous invocation counter
 void setExceptionsClient(int i)
          Setter method for client exceptional invocation counter
 void setExceptionsServer(int i)
          Setter method for server exceptional invocation counter
 void setMethodName(String string)
          Setter method for method name
 void setParameters(Class[] list)
          Setter method for parameter types array
 void setParameterTypes(String[] list)
          Setter method for parameter types array
 void setReturnType(String string)
          Setter method for return type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodName_

private String methodName_
Method name


parameters_

private Class[] parameters_
Method's parameter types array


parameterTypes_

private String[] parameterTypes_
Method's parameter types array


returnType_

private String returnType_
Method's return type


correct_

private int correct_
Method's correct invocation counter


errors_

private int errors_
Method's erroreous invocation counter


exceptionsClient_

private int exceptionsClient_
Method's client exceptional invocation counter


exceptionsServer_

private int exceptionsServer_
Method's server exceptional invocation counter

Constructor Detail

MethodStat

public MethodStat()
Default constructor


MethodStat

public MethodStat(Method method)
Constructor that creates new MethodStat instance for given method. All necessary informations are copied from given method parameter.

Parameters:
method - to create statistics for
Method Detail

getElement

public ElementImpl getElement(DocumentImpl document)
Retrieves XML element for current method statistics subtree.

Parameters:
document - parent document to add current element to
Returns:
XML document of current method statistics element

getErrors

public int getErrors()
Getter method for erroreous invocation counter

Returns:
erroreous invocation counter

getExceptionsClient

public int getExceptionsClient()
Getter method for client exceptional invocation counter

Returns:
client exceptional invocation counter

getExceptionsServer

public int getExceptionsServer()
Getter method for server exceptional invocation counter

Returns:
exceptional invocation counter

getCorrect

public int getCorrect()
Getter method for correct invocation counter

Returns:
correct invocation counter

getAllInvocations

public int getAllInvocations()
Getter method for all method invocations_ number

Returns:
all invocations_ number

getMethodName

public String getMethodName()
Getter method for method name

Returns:
method name

getParameterTypes

public String[] getParameterTypes()
Getter method for parameter types array

Returns:
parameter types array

getReturnType

public String getReturnType()
Getter method for return type

Returns:
return type

setErrors

public void setErrors(int i)
Setter method for erroreous invocation counter

Parameters:
i - erroreous invocation counter

setExceptionsClient

public void setExceptionsClient(int i)
Setter method for client exceptional invocation counter

Parameters:
i - exceptional invocation counter

setExceptionsServer

public void setExceptionsServer(int i)
Setter method for server exceptional invocation counter

Parameters:
i - exceptional invocation counter

setCorrect

public void setCorrect(int i)
Setter method for correct invocation counter

Parameters:
i - correct invocation counter

setMethodName

public void setMethodName(String string)
Setter method for method name

Parameters:
string - method name

setParameters

public void setParameters(Class[] list)
Setter method for parameter types array

Parameters:
list - parameter types array

setParameterTypes

public void setParameterTypes(String[] list)
Setter method for parameter types array

Parameters:
list - parameter types array

setReturnType

public void setReturnType(String string)
Setter method for return type

Parameters:
string - return type

hashKey

public String hashKey()
Creates hash key for HashMap corresponding to current method statistics. Generated key is String made from methodName_, parameterTypes_ and returnType_

Returns:
hash key for current method statistics

equals

public boolean equals(Object o)
Typical equals method.

Parameters:
o - to check if it is equal to this