commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory" <>
Subject RE: [lang] text.Interpolation, on to 2.2
Date Sat, 09 Jul 2005 18:54:39 GMT
In-lined at the end ... G

> From: Stephen Colebourne []
> Sent: Saturday, July 09, 2005 6:32 AM
> To: Jakarta Commons Developers List
> Subject: Re: [lang] text.Interpolation, on to 2.2
> >> a) we don't have the ability to call it directly from StrBuilder
> >> without copying the char array to a String. (VariableFormatter
> >> rewriting to operate on a char[])
> Hmmm. I've just realised that this won't work. VariableFormatter may
> need to lengthen the array, and that isn't possible outside the
> StrBuilder class (without horrible hacks).
> So, IMHO, we need to focus on StrBuilder again. StrBuilder is intended
> as our mutable string. VariableFormatter can use a StrBuilder
> StrTokenizer doen't need to use StrBuilder as it doesn't change the
> string. VariableFormatter does change the string, so should be built
> StrBuilder.
> Oliver Heger wrote:
> > I think, it shouldn't be a problem to implement the
> > Matcher interface to locate variables in the source string. But I
> > have to study the StrTokenizer class whether it is possible to
> > the variables' names once they have been detected.
> My point wrt StrTokenizer was that the Matcher interface *might* be
> useful. However, on further reflection, I think it is best to keep the
> two classes a bit more separate. We shouldn't force re-use.

I agree, and in this spirit I would want VariableFormatter to only use
StrBuilder because it needs to, not because it is just there.


> Stephen

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

View raw message