commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <...@apache.org>
Subject Re: [VOTE] (re-vote) XxxUtils constructors
Date Thu, 22 Aug 2002 19:05:49 GMT
On Thu, 22 Aug 2002, Stephen Colebourne wrote:
> Michael,
> Please do not write a special tool for generating source code to solve this.
> The following code will do the trick:
> 
> public class StringUtils {
>     private StringUtils() {
>         super();
>     }
> 
>     public static class Bean extends StringUtils {
>         public Bean() {
>             super();
>         }
>     }
> }
> 
> You can't do new StringUtils();
> You can do new StringUtils.Bean();
> 
> Standard inner class behaviour allows the utils class to be private, yet
> provide an adaptor bean that is public. This is very low maintainance ;-)

oh...  duh...  :)

Still might be useful to build such a tool to create bean wrappers for 
java.util.Collections.  Heck, that changes so infrequently, it's 
probably just as easily done by hand, but I'm no longer going to 
volunteer to provide such a thing.  :)

ok, so now there's zero maintenance on this compromise.  Are there any 
other reasons why this doesn't make people happy?

regards,
michael


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message