2009/8/17 Paul Sandoz <Paul.Sandoz_at_sun.com>:
> On Aug 17, 2009, at 1:48 PM, James Strachan wrote:
>>>
>>> I would be willing to compromise on the above if InjectionPoint could be
>>> injected, small steps :-)
>>> I guess that would mean we do not require a bindAnnotation method and
>>> could
>>> do just:
>>>
>>> bind(String.class).annotatedWith(QueryParam.class).toProvider(QueryParamProvider.class);
>>> (I am not sure if Guice will barf if other annotations are present with
>>> QueryParam, e.g. @DefaultValue).
>>
>> Guice barfs if more than one annotation is used which is annotated
>> with @BindingAnnotation; so maybe you can avoid the @BindingAnnotation
>> on @DefaultValue?
>>
>
>
> OK. That reminds that Guice will also barf when using annotatedWith and the
> annotation is not annotated with @BindingAnnotation. Damn! that makes it
> hard to reuse an existing annotation.
Agreed! :(
Guice is 95% there; but that last 5% can be pretty frustrating :)
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/