commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Re: [VOTE] (re-vote) XxxUtils constructors
Date Thu, 22 Aug 2002 12:58:16 GMT
On 8/22/02 4:07 AM, "Juozas Baliuka" <> wrote:

> Current version (1.0-b1) of Lang StringUtils has private constructor.
> I propose to change it to "public depricated" in commons-lang-1.0 and
> "private final" in commons-lang-2.0 and up.
> It will help for "tools like Velocity" to support "static utilty classes" ,
> tools will have time
> to implement support for something like this or "better" :
> context.putClass( "Math", Math.class );
> context.putClass( "Strings1", loadClass( className1 ) );
> context.putClass( "Strings2", loadClass( className2 ) );
> /* add static methods to default namespace */
> context.getGlobalNamespace().add(   "Math"  ).add("String1").add("String2");
> /* add static methods to StringUtils namespace */
> context.addNamespace(   "StringUtils"  ).add("String1").add("String2");

So you are suggesting we change our core APIs so you don't have to add an
empty, public CTOR to the utility class?   And then everyone who has
implement a custom context implementation will also have to change?

Do you think that the additional data structures required to support the
above will be far less than the 12 bytes you are 'saving' for us by not
letting us put an instance of the class into the context?

In the process, we'll have to add to every web framework that has support
for Velocity as a templating engine (Turbine, Struts, Maveric, WebWork,
Melati, ...) a way of specifying in the toolbox definition the way that the
user-specified tool class should be loaded, but I am sure that won't amount
to more than 12 bytes either...

Geir Magnusson Jr. 
Research & Development, Adeptra Inc.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message