Introduce Foreign Method
A server class you are using needs an additional method, but you can’t modify the class.
Create a method in the client class with an instance of the server class as its first argument.![](http://www.cnblogs.com/images/cnblogs_com/nanshouyong326/90398/o_20080126(020).jpg)
A server class you are using needs an additional method, but you can’t modify the class.
Create a method in the client class with an instance of the server class as its first argument.