dev@jsr311.java.net

Re: JSR311: GenericEntity state should be settable

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 20 Aug 2008 17:08:03 -0400

Better yet, just add a genericEntityType(Type type) to ResponseBuilder
and getGenericEntityType() in Response.

Bill Burke wrote:
> https://jsr311.dev.java.net/issues/show_bug.cgi?id=48
>
> GenericEntity should have an additional constructor so that rawType,
> type, and
> entity can be set by applications using reflection to construct entity
> objects.
>
> public GenericEntity(Class rawType, Type genericType, T entity)
> {
> this.rawType = rawType;
> this.genericType = genericType;
> this.entity = entity;
> }
>
> This would allow applications that are using reflection to set the
> generic type.
> It would be public as it doesn't make much sense to require extending.
>
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com