dev@jsr311.java.net

Re: JSR311: _at_*Param and List<?>

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 17 Mar 2008 15:07:51 -0700

On Mar 17, 2008, at 2:14 PM, Stefan Tilkov wrote:

> On Mar 17, 2008, at 6:55 PM, Marc Hadley wrote:
>
>> I propose to change the parameter types that can be annotated with
>> @*Param to include List. E.g. you could do:
>>
>> @GET
>> Foo getFoo(@QueryParam("bar") List<String> bars) {...}
>>
>
> My apologies if this is a dumb question, but what would the URI look
> like? Multiple bar=... query params?
>
Yes, exactly.

Marc.


>
>> The list member type would be the same as currently supported, i.e.
>> any type that has a String cnstructor or valueOf(String) method.
>>
>> Using the @DefaultValue annotation with a List<?> type will ensure
>> the parameter always has at least one member whose value is
>> specified by the @DefaultValue annotation.
>>
>> Any objections ?
>> Marc.
>>
>> ---
>> Marc Hadley <marc.hadley at sun.com>
>> CTO Office, Sun Microsystems.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
>> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.