[jax-rs-spec users] [jsr339-experts] type information within Entity class

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

This is similar to

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 Burke
JBoss, a division of Red Hat