You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Tom Schindl <to...@gmx.at> on 2006/05/02 19:36:13 UTC

Re: [lang] VariableFormatter issues

<snip>
>>>The implementation in the ticket subclasses VariableFormatter, why not
>>>subclass just MapVariableResolver only?
>>>
>>>   
>>>
>>
>>Because of the above mentionned bloated API if you want to turn it
>>on/off in VariableFormatter.
>> 
>>
> 
> I think part of the problem is that many method signatures expect a Map
> and convert this automatically into a MapVariableResolver (e.g.
> constructors of VariableFormatter, static replace() methods). This is
> convenient for the users that only need the default functionality, but
> makes it hard to use a different VariableResolver implementation.
> 
> Shouldn't we at least have static replace() methods that take a
> VariableResolver as argument? Then a caller can decide if he/she wants a
> default or a formatting enabled resolver.
> 

Yeah. I agree 100% with you Oliver having such a method and adding an
boolean attribute to MapVariableResolver to turn on/off the feature
would be sufficient.

Tom