DuckTypingDispatcherpublic class DuckTypingDispatcher extends Object implements DispatchableDuck typing dispatcher; converts dispatch methods calls from one class to another by
looking up equivalently methods at runtime by name.
For example, if two types have identical method names and arguments, but
are not subclasses/subinterfaces of each other, this dispatcher will allow calls to be
made from one type to the other. |
Fields Summary |
---|
private final MethodNameInvoker | mDuck |
Constructors Summary |
---|
public DuckTypingDispatcher(Dispatchable target, Class targetClass)Create a new duck typing dispatcher.
checkNotNull(targetClass, "targetClass must not be null");
checkNotNull(target, "target must not be null");
mDuck = new MethodNameInvoker<T>(target, targetClass);
|
|