CommandProxypublic class CommandProxy extends Object implements InvocationHandlerThis class is an InvocationHandler based on a Map of method names to Command
objects. When the invoke() method is called, the name of the method to be
invoked is looked up in the map, and the associated Command, if any is
invoked. Arguments passed to invoke() are always ignored. Note that there
is no public constructor for this class. Instead, there is a static factory
method for creating Proxy objects that use an instance of this class.
Pass the interface to be implemented and a Map of name/Command pairs. |
Fields Summary |
---|
Map | methodMap |
Constructors Summary |
---|
private CommandProxy(Map methodMap) this.methodMap = methodMap;
|
|