commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mwm.lt>
Subject Re: [VOTE] (re-vote) XxxUtils constructors
Date Thu, 22 Aug 2002 08:07:30 GMT

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");

////////////////////////////////////////////////////////// USAGE
//////////////////////////////////////////

$Math.sin(0)
$sin(0)


$Strings2.split2( $var )
$Strings1.split1( $var )

$split2( $var )
$split1( $var )

$StringUtils.split1( $var )
$StringUtils.split2( $var )

To implement this "tools" do not need "public extendable".



>
> Next release of?
>
> > I think "private" is a "better design", but it is too late for next
release.
> > "final" do not help for static method invokation performace, it safe to
> > "inline" static method "final" or not.
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>


--
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