ovm.polyd.runemu
Class RunaboutStatInvocation

java.lang.Object
  extended by ovm.polyd.policy.Invocation
      extended by ovm.polyd.policy.PlainInvocation
          extended by ovm.polyd.runemu.RunaboutStatInvocation

public class RunaboutStatInvocation
extends PlainInvocation

An invocation policy that keeps track of the number of invocations performed. Used by RunaboutStat.


Method Summary
 java.lang.Object invoke(java.lang.Object obj, java.lang.reflect.Method m, java.lang.Object[] args)
          Invoke one method, using the given argument, performing additional actions whenever necessary.
static void printStats()
          Prints statistics about the invocations performed so far using this invocation policy.
static Invocation theInvocation()
          Returns an instance of this invocation policy.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

theInvocation

public static Invocation theInvocation()
Returns an instance of this invocation policy.

Returns:
an instance of this policy (a singleton)

invoke

public java.lang.Object invoke(java.lang.Object obj,
                               java.lang.reflect.Method m,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Description copied from class: Invocation
Invoke one method, using the given argument, performing additional actions whenever necessary.

Overrides:
invoke in class PlainInvocation
Parameters:
obj - the instance to which the message is sent
m - the method
args - the arguments (including wrapped primitives)
Returns:
the result of the method invocation, or null
Throws:
java.lang.Throwable

printStats

public static void printStats()
Prints statistics about the invocations performed so far using this invocation policy.