Why is TagUtils instance final?

2004-02-26 Thread Niall Pemberton

I don't understand why the instance of TagUtils has been made final:

private static final TagUtils instance = new TagUtils();

Isn't the logic behind having an 'instance' of TagUtils so that if someone want to 
change an aspect of TagUtils behaviour they can extend it and override a particular 
method? Otherwise why not just have a bunch of static methods in TagUtils?

Does anyone have opinions on changing this so that TagUtils implementation could be 
customized?

Niall


Re: Why is TagUtils instance final?

2004-02-26 Thread David Graham
--- Niall Pemberton [EMAIL PROTECTED] wrote:
 
 I don't understand why the instance of TagUtils has been made final:
 
 private static final TagUtils instance = new TagUtils();

It's simply following the Singleton pattern.  I have no problems with
changing this to allow clients to instantiate a TagUtils instance
directly.

David

 
 Isn't the logic behind having an 'instance' of TagUtils so that if
 someone want to change an aspect of TagUtils behaviour they can extend
 it and override a particular method? Otherwise why not just have a bunch
 of static methods in TagUtils?
 
 Does anyone have opinions on changing this so that TagUtils
 implementation could be customized?
 
 Niall
 


__
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools

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