ovm.polyd.policy
Class Invocation

java.lang.Object
  extended by ovm.polyd.policy.Invocation
Direct Known Subclasses:
PlainInvocation, RunaboutLogInvocation

public abstract class Invocation
extends java.lang.Object

The common superclass of all invocation policies.

The methods defined in this class can be overridden in order to create user-defined invocation policies. Please check out the invidual methods below to know more.


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.

This method must be defined in every user-defined invocation policy. It must return one instance of the same class, normally a singleton allocated during construction. This method is used reflexively to allow access to the fields and methods of the class given the class name.

Returns:
an instance of this class (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
Invoke one method, using the given argument, performing additional actions whenever necessary.

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