net.sourceforge.dynamicdispatch
Interface Dispatcher
- public interface Dispatcher
Interface of the dispatcher object. A dispatcher is always bound to
a receiver (called visitor) when it is created by a dispatcher
factory. The dispatch method calls the
most appropriate visit method in the visitor.
For more information see package overview.
- Version:
- 0.0.4
- Author:
- Fabian Buettner
|
Method Summary |
void |
dispatch(java.lang.Object argument)
Invoke visit(argument) on the receiver of this dispatcher. |
dispatch
public void dispatch(java.lang.Object argument)
- Invoke visit(argument) on the receiver of this dispatcher. Which
of the overloaded visit methods is invoked is dynamically chosen
based on the runtime type of target). The most appropriate visit
method is the one with the most specific argument class to which
argument is assignable. If no visit method is applicable, a
dispatch
error is raised.
- Throws:
DispatchError