ovm.polyd.runemu
Class RunaboutDisp

java.lang.Object
  extended by ovm.polyd.policy.Dispatching
      extended by ovm.polyd.policy.MultiDisp
          extended by ovm.polyd.runemu.RunaboutDisp

public class RunaboutDisp
extends MultiDisp

A dispatching policy that reproduces the method selection policy used by the original Runabout. It is derived from parts of the original Runabout source code, and it is therefore released under the terms of the GNU Public License.


Nested Class Summary
 
Nested classes/interfaces inherited from class ovm.polyd.policy.MultiDisp
MultiDisp.MultiDispException
 
Constructor Summary
RunaboutDisp()
           
 
Method Summary
 int bestMatch(java.lang.Class[] args, java.lang.reflect.Method[] meth)
          Dynamically selects the most appropriate method for a certain combination of arguments.
static Dispatching theDispatcher()
          Returns an instance of this dispatching policy.
 java.lang.String toString()
          Returns the name of this dispatcher
 
Methods inherited from class ovm.polyd.policy.MultiDisp
compatibleSet
 
Methods inherited from class ovm.polyd.policy.Dispatching
bestMatch, compatibleSet, disableCaching, handleMissing, handleMissing, remapNull, remapNull
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunaboutDisp

public RunaboutDisp()
Method Detail

theDispatcher

public static Dispatching theDispatcher()
Returns an instance of this dispatching policy.

Returns:
an instance of this policy (a singleton)

bestMatch

public int bestMatch(java.lang.Class[] args,
                     java.lang.reflect.Method[] meth)
Description copied from class: Dispatching
Dynamically selects the most appropriate method for a certain combination of arguments.

Overrides:
bestMatch in class MultiDisp
Parameters:
args - the array of classes of non-raw arguments
meth - the array of methods involved in the selection
Returns:
the index of the best applicable method in the meth array, or -1 if none can be chosen.
See Also:
Dispatching.bestMatch(Class[], Method[], Object[], Class[], Method, String)

toString

public java.lang.String toString()
Description copied from class: Dispatching
Returns the name of this dispatcher

Overrides:
toString in class MultiDisp
Returns:
a string containing the name of the dispatcher