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 Wed, 29 Jun 2005 15:23:17 GMT
Hi & wait a sec, you cannot just "let the other methods unimplemented",
the code will not compile. All interface methods must be implemented,
the bodies of void methods can be empty, others and can return nulls and
0's or throw exceptions, sure, but that seems confusing. 

It seems simpler to have an interface with one method than to explain
that the resolver is a Map, but not really, and that, today, only this
here methods needs to be implemented. Or am I missing something?

-----Original Message-----
From: Emmanuel Bourg [] 
Sent: Tuesday, June 28, 2005 6:26 PM
To: Jakarta Commons Developers List
Subject: Re: [lang] text.Interpolation, on to 2.2

Simon Kitching wrote:

> You mean that someone with special resolving requirements should
> a custom class that implements Map?

Yes that's what I mean.

> However for the other cases the user has to implement the Map
> which it's quite a lot of work. As the resolve method actually uses
> the "get" method on the map it seems a shame to require the user to
> implement the full Map interface.

On the other hand, if the resolve method guarantees that it will only 
use the get() method from the Map interface, the user is free to let the

other methods unimplemented. The hint could be included in the javadoc, 
this should be enough for the minority of users interested in 
implementing a custom variable resolution.

Emmanuel Bourg

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

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

View raw message