commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schindl <tomatli...@gmx.at>
Subject Re: [lang] VariableFormatter issues
Date Tue, 02 May 2006 17:36:13 GMT
<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

Mime
View raw message