On Jan 2, 5:02 pm, Frank Weiss <fewe...@gmail.com> wrote:
> For your first issue, can you refactor to use singleton Factory instead and
> make the "factory methods" non-static? Example:
>
> MyFactory factory = MySubclassedFactory.getInstance();
> MyWidget = factory.createMyWidget();

This and the Builder pattern suggestion are the right way to think
about the design. But you still have to implement a new method to
create a subclass of MyWidget and/or cast the return to
MySubclassWidget. This is also true with the Builder pattern (if you
want to operate on an instance of the subclass of pizza per the
Wikipedia example).

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to