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

[jsr339-experts] type information within Entity class

From: Bill Burke <bburke_at_redhat.com>
Date: Mon, 23 Jan 2012 09:30:29 -0500

This is similar to

http://java.net/jira/browse/JAX_RS_SPEC-156

I want to add type information to the Entity class. There will be cases
where developers are building an Entity class based on a generic
java.lang.Object and type information extracted from reflection calls,
so I propose adding an additional static method to Entity class:

public static Entity entity(Object entity, Class<?> type, Type
genericType, MediaType mediaType);

And additional methods to Entity class:

Class<?> getType() {...}
Type getGenericType() {...}

FYI, I'd add an issue to Jira, but it seems to be down ATM. Please
remind me if I don't!

Bill




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