[josm-dev] Jumbo Patch
Dave Hansen
dave at sr71.net
Sat Dec 15 18:39:19 GMT 2007
On Sat, 2007-12-15 at 08:44 +0000, Gervase Markham wrote:
> If you are finding yourselves writing lots of stub functions that don't
> do anything, then the Adapter pattern (or, at least, what Sun calls the
> Adapter pattern) is what you need :-) Example:
> http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/MouseAdapter.html
>
> Then, your derivative class extends FooAdapter, and you don't have to
> stub out all the methods; you just implement the ones you need.
What if the derivative class is already derived from something? Java
doesn't allow real multiple inheritance does it?
-- Dave
More information about the josm-dev
mailing list