Hi Charles,

Your enhancement automates implementation of a very useful design pattern.
I will include it in the next release of the JDE.

Thanks,

Paul

At 12:15 PM 7/13/00 -0400, you wrote:
>Paul,
>
>Submitted for your approval is an addition to the JDE to automate the
>process of delegating method calls to an attribute of a class.  It is
>similar in concept to jde-wiz-implement-interface.
>
>The basic idea is that I have a class A that cannot for some reason inherit
>from class B, however I wish A to implement many or all of the methods of B.
>One solution is define an attribute of class B in A and then declare all of
>the desired methods of B in A and simply delegate calls to those methods to
>the instance of B held by A.
>
>The new method supplied in jde-enhancement.el named jde-wiz-delegate
>automates the creation of this pattern.  It assumes you have declared your
>delagate attribute.  When you invoke jde-wiz-delegate, it propmts for the
>name of the attribute to delegate calls to and then determines its type.  It
>then inserts definitions for all public methods of the delegate class into
>the current class at the point.  Any additional imports necessary are also
>inserted at the top of the buffer.
>
>The jde-enhancement.el file is simply a container for a few new and updated
>functions that should probably go in existing jde elisp files (most probably
>jde-wiz.el and beanshell.el
>
>There is a new Java class DelegateFactory.java that is based on
>InterfaceFactory.java and I added one method to Signature.java that is
>called by DelegateFactory.java.
>
>If you have any questions, please let me know.  Thanks for such a useful
>package!
>
>-- Fred Hart
>
>
>Attachment Converted: "g:\eudora\attach\jde-enhancements.el"
>
>Attachment Converted: "g:\eudora\attach\DelegateFactory.java"
>
>Attachment Converted: "g:\eudora\attach\Signature.java"
>

Reply via email to