MethodInvocation
| Kind of class: | class |
|---|---|
| Inherits from: | AbstractTestResult < BasicClass |
| Implements: | |
| Author: | Simon Wacker |
| Classpath: | org.as2lib.test.speed.MethodInvocation |
| File last modified: | Sunday, 29 May 2005, 09:19:44 |
MethodInvocation reflects a profiled method invocation.Summary
Constructor
Instance methods
- getMethod
- getName
- getMethodName
- getSignature
- getTime
- setTime
- getArguments
- setArguments
- getReturnValue
- setReturnValue
- getException
- setException
- wasSuccessful
- getCaller
- setCaller
- getPreviousMethodInvocation
- setPreviousMethodInvocation
- isPreviousMethodInvocation
- toString
Instance methods inherited from AbstractTestResult
Instance methods inherited from BasicClass
Constructor
MethodInvocation
function MethodInvocation (
method:MethodInfo)
Constructs a new
MethodInvocation instance.Parameters:
method:
the invoked method
Throws:
Class properties
UNKNOWN
static UNKNOWN:String = "[unknown]"
(read,write)
Designates an unknown type in the type signature.
VOID
static VOID:String = "Void"
(read,write)
Designates type
Void in the type signature.Instance methods
getArguments
function getArguments (
Void) : Array
Returns the arguments used for this method invocation.
Returns:
the arguments used for this method invocation
getCaller
function getCaller (
Void) : MethodInvocation
Returns the method invocation that called the method that resulted in this
method invocation.
method invocation.
Returns:
the method invocation that called the method that resulted in this
method.
method.
getException
function getException (
Void)
Returns the exception thrown during this method invocation.
Returns:
the exception thrown during this method invocation
getMethod
function getMethod (
Void) : MethodInfo
Returns the invoked method.
Returns:
the invoked method
getMethodName
function getMethodName (
Void) : String
Returns the full name of the invoked method.
Returns:
the full name of the invoked method
getName
function getName (
Void) : String
Returns the name of this method invocation. This is the method's name plus the
signature of this method invocation.
signature of this method invocation.
getPreviousMethodInvocation
function getPreviousMethodInvocation (
Void) : MethodInvocation
Returns the previous method invocation.
Returns:
the previous method invocation
getReturnValue
function getReturnValue (
Void)
Returns this method invocation's return value.
Returns:
this method invocation's return value
getSignature
function getSignature (
Void) : String
Returns the signature of this method invocation.
If any information needed to generate the signature is not defined,
UNKNOWN is used as placeholder.
Returns:
this method invocation's signature
getTime
function getTime (
Void) : Number
Returns the time in milliseconds needed for this method invocation.
Returns:
the time in milliseconds needed for this method invocation
Specified by:
TestResult#getTime
isPreviousMethodInvocation
function isPreviousMethodInvocation (
methodInvocation:MethodInvocation) : Boolean
Checks whether this method invocation was invoked before the passed-in
methodInvocation.Parameters:
methodInvocation:
the method invocation to make the check upon
Returns:
passed-in
true if this method invocation was invoked previously to thepassed-in
methodInvocation else falsesetArguments
function setArguments (
args:Array) : Void
Sets the arguments used for this method invocation.
Parameters:
args:
the arguments used for this method invocation
setCaller
function setCaller (
caller:MethodInvocation) : Void
Sets the method invocation that called the method that resulted in this method
invocation.
invocation.
Parameters:
caller:
the method invocation that called the method that resulted in this
method invocation.
method invocation.
setException
function setException (
exception) : Void
Sets the exception thrown during this method invocation.
Parameters:
exception:
the exception thrown during this method invocation
setPreviousMethodInvocation
function setPreviousMethodInvocation (
previousMethodInvocation:MethodInvocation) : Void
Sets the previous method invocation.
Parameters:
previousMethodInvocation:
the previous method invocation
setReturnValue
function setReturnValue (
returnValue) : Void
Sets the return value of this method invocation.
Parameters:
returnValue:
the return value of this method invocation
setTime
function setTime (
time:Number) : Void
Sets the time in milliseconds needed for this method invocation.
Parameters:
time:
the time in milliseconds needed for this method invocation
toString
function toString (
) : String
Returns the string representation of this method invocation.
Parameters:
rootTestResult:
test result that holds the total values needed for
percentage calculations
percentage calculations
Returns:
the string representation of this method invocation
Overrides:
Specified by:
wasSuccessful
function wasSuccessful (
Void) : Boolean
Returns whether this method invocation was successful. Successful means that it
returned a proper return value and did not throw an exception.
returned a proper return value and did not throw an exception.
Returns:
true if this method invocation was successful else false