D'oh! Didn't see the obvious before. Is it Friday already because my brain apparently thinks it is! :)

Frank

Craig McClanahan wrote:
On Thu, 31 Mar 2005 15:06:05 -0500 (EST), Frank W. Zammetti
<[EMAIL PROTECTED]> wrote:

On Thu, March 31, 2005 1:57 pm, Craig McClanahan said:

Every single time I've created a static utilities class (and that
includes things like Commons BeanUtils) I have regretted it, because
users are stuck with the functionality you provide and cannot
customize.

I don't follow... isn't the problem you mention exactly what inheritance is meant to solve? You aren't making those utility classes final, are you? :)


Assume a helper:

    public class Helper {

        public static void doSomething(String foo);

    }

and your clients can call Helper.doSomething().

Now, I'd like to specialize the behavior of doSomething() to meet my
needs.  Can't be done without changing all my calls to use a different
class name instead.

An implementation class implementing a specific interface (and with
non-static methods, obviously) can be replaced without requiring that.

Craig





-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to