users@jersey.java.net

Re: Type argument in MessageBodyWriter methods

From: ljnelson <ljnelson_at_gmail.com>
Date: Wed, 14 Apr 2010 09:32:43 -0800 (PST)

On Wed, Apr 14, 2010 at 1:22 PM, Marc Hadley-2 [via Jersey]
<ml-node+4902946-829394228-210534_at_n2.nabble.com> wrote:
> Type gives more information that Class. E.g. the class of List<String> is
> List.class, you need the Type to determine that its actually a list of
> strings. In many cases you probably won't care about the difference, its
> provided for those cases where you do care.

OK; is it accurate to say that the Class argument could have been
discarded entirely? Not arguing that it should, just that Type is a
superset of Class, so you really only NEED that one argument. Just
trying to cement my understanding.

(Would the Type argument in your example be String, or List<String>?
Presumably the latter.)

Best,
Laird

-- 
View this message in context: http://n2.nabble.com/Type-argument-in-MessageBodyWriter-methods-tp4902440p4903018.html
Sent from the Jersey mailing list archive at Nabble.com.