ovm.polyd.policy
Class DebuggingInvocation

java.lang.Object
  extended by ovm.polyd.policy.Invocation
      extended by ovm.polyd.policy.PlainInvocation
          extended by ovm.polyd.policy.DebuggingInvocation

public class DebuggingInvocation
extends PlainInvocation

An invocation policy that prints on the standard output all the method invocations, and the return values.


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 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