jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Is ParamConverterProvider needed ?

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Wed, 5 Sep 2012 09:43:02 +0100

On 04/09/12 18:24, Bill Burke wrote:
> The provider allowa you to trigger a ParamConverter base on an applied
> annotation, no?

What kind of annotation ? The runtime knows when it deals with a JAX-RS
'parameter', when processing the request, example, when converting URI
path or query values into method parameters annotated with
@PathParam/etc, or when converting objects passed to query/etc target
methods on the client.

Is it really for accommodating @Lazy annotation ?

>
> Generic type information can be obtained by introspecting the class.

Right. If so, why is it passed as a parameter, what exactly it can help
with, an example would help ?

Sergey

>
> On 9/4/2012 12:38 PM, Sergey Beryozkin wrote:
>> Hi
>>
>> We have ParamConverterProvider and ParamConverter, I wonder do we really
>> need the former ?
>>
>> Example, individual ExceptionMapper implementations can be registered as
>> providers, why should ParamConverter implementations be created
>> indirectly via ParamConverterProvider ?
>>
>> I can see ParamConverterProvider allows to find the providers for
>> arguments like "List<Book>" - but do we really need it ?
>>
>> Sergey
>