ovm.polyd
Class Factory

java.lang.Object
  extended by ovm.polyd.Factory

public abstract class Factory
extends java.lang.Object

Used to create manually new instances of the desired dispatcher. Use a Factory to build dispatchers manually, rather than using annotations.

This class is not normally accessed directly, and it is of use only when using the pre-5.0 version of PolyD. To create a dispatcher manually, first create a Descriptor to specify all the characteristics of the desired dispatcher. When the Descriptor is registered, a Factory is generated, that can then be used to produce new dispatchers.

The bodies must be equal, in number and class, to the list supplied when building the Descriptor.

See Also:
Descriptor

Method Summary
 java.lang.Object getDispatcher1(java.lang.Object a)
          If you have only one body, use this method to create the new dispatcher.
 java.lang.Object getDispatcher2(java.lang.Object a, java.lang.Object b)
          If you have two bodies, use this method to create the new dispatcher.
 java.lang.Object getDispatcher3(java.lang.Object a, java.lang.Object b, java.lang.Object c)
          If you have three bodies, use this method to create the new dispatcher.
 java.lang.Object getDispatcher4(java.lang.Object a, java.lang.Object b, java.lang.Object c, java.lang.Object d)
          If you have four bodies, use this method to create the new dispatcher.
 java.lang.Object getDispatcherN(java.lang.Object[] a)
          If you have more than four bodies, use this method to create the new dispatcher.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDispatcher1

public java.lang.Object getDispatcher1(java.lang.Object a)
If you have only one body, use this method to create the new dispatcher.

Parameters:
a - the body
Returns:
the new dispatcher, which can be downcasted to the interface used to build the Descriptor.

getDispatcher2

public java.lang.Object getDispatcher2(java.lang.Object a,
                                       java.lang.Object b)
If you have two bodies, use this method to create the new dispatcher.

Parameters:
a - the first body
b - the second body
Returns:
the new dispatcher, which can be downcasted to the interface used to build the Descriptor.

getDispatcher3

public java.lang.Object getDispatcher3(java.lang.Object a,
                                       java.lang.Object b,
                                       java.lang.Object c)
If you have three bodies, use this method to create the new dispatcher.

Parameters:
a - the first body
b - the second body
c - the third body
Returns:
the new dispatcher, which can be downcasted to the interface used to build the Descriptor.

getDispatcher4

public java.lang.Object getDispatcher4(java.lang.Object a,
                                       java.lang.Object b,
                                       java.lang.Object c,
                                       java.lang.Object d)
If you have four bodies, use this method to create the new dispatcher.

Parameters:
a - the first body
b - the second body
c - the third body
d - the fourth body
Returns:
the new dispatcher, which can be downcasted to the interface used to build the Descriptor.

getDispatcherN

public java.lang.Object getDispatcherN(java.lang.Object[] a)
If you have more than four bodies, use this method to create the new dispatcher.

Parameters:
a - the array of bodies
Returns:
the new dispatcher, which can be downcasted to the interface used to build the Descriptor.