commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <>
Subject [lang] VariableFormatter - pre 2.2
Date Thu, 06 Jul 2006 00:07:04 GMT
Henri Yandell wrote:
> Anyone know of any half-finished code in there at the moment?

I think I'm on record for saying that the VariableFormatter class 
doesn't quite fit as is IMHO. But I've not spelt out why, so here goes...

At a minimum, I'd like to see MapVariableResolver packge scoped.

However, I thnk I'd rather see VariableResolver changed to be a more 
general StrLookup class rather like StrMatcher. That way it could be 
used equally as well independent of VariableFormatter.

public class StrLookup {
   String lookup(String key);

   // package scoped implementation for Map

You could envisage other (non [lang]) accessors such as OGNL, EL, XPath 
or perhaps ones that accessed a List of strings by index.

The key point is that this shouldn't be limited to just 
VariableFormatter in the same way that StrMatcher isn't limited to 
StrTokenizer. Separation of Concerns.


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

View raw message