Gary Gregory wrote:
Hm, I did not realize that being to f/w-ish was an issue, which is fine
and seems clear now.
How about this as a compromise (thinking aloud):
The (currently imaginary) class VariableFormat holds a Map and defines a
method VariableFormat#resolve(String name).
[configuration] can subclass the class and override the
VariableFormat#resolve(String name) to provide its own logic. This would
allow for the resolve by delegation scenario.
You would "normally" front-load a VariableFormat with a Map.
Oliver, would you consider this workable for [configuration]?
Gary
Yes, this would perfectly work for [configuration].
And to gain more convenience when directly called the VariableFormat
class could still define a static method
String replace(String source, Map map), which would internally create an
instance, feed it with the passed in map and call the interpolation
method on this instance.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]