users@jersey.java.net

[Jersey] Getting the class behind a Resource instance?

From: cowwoc <cowwoc_at_bbs.darktech.org>
Date: Thu, 17 Apr 2014 20:38:57 -0400

Hi,

I am attempting to replace ResourceContext.matchResource(URI) as
mentioned at http://stackoverflow.com/q/17284419/14731

Assuming I navigate the resources returned by
ExtendedResourceContext.getResourceModel() and find a match, how do I
resolve a Resource instance to the user class behind it?

Meaning, given:

@Path("/MyResource")
class MyResource
{
}

if the Resource instance I end up with corresponds to this class, how I
can navigate from the org.glassfish.jersey.server.model.Resource to
MyResource? I don't see any method for doing this.

Thanks,
Gili