Is there a way to use the (JAX-RS) Jersey reflection api to access methods given as an argument?

Jersey must handle internal resource mappings so that, given the URL (/ root / my / resource), it will call the appropriate annotated class / method to handle the request. I searched the api looking for a way to get the class instance (and the correct method) pointed to by a given path. Is it possible?

For example:

Class<?> clazz = SomeJerseyMethodToGetClass('/root/my/resource'); 

      

I found something similar in this post: Find a list of all Jersey resource methods in my application? but in this case I will need to know the processing class in advance. Any thoughts?

Thanks in advance.

+3
java reflection rest jersey annotations


source to share


No one has answered this question yet

See similar questions:

7
Find a list of all resource methods in my application?

or similar:

20
Jersey REST ResourceConfig instance does not contain root resource classes
nine
Jersey REST Server: Creating Resource Classes
nine
How can I get resource annotations in Jersey ContainerResponseFilter
4
REST API - Swagger + Java + Jersey wrong way and extra apis
1
How does Jersey framework implement the JAX-RS API in REST?
1
Jersey 1.0 JAX RS: How to convert uri strings to REST method calls?
0
Jersey Servlet: RequestDispatcher returns 404
0
How to intercept a request in Jersey using annotations?
0
How to cancel searching for resource on given path in Java Jersey + Dropwizard?
0
Getting 404 Not Found when calling JAX-RS rest API method



All Articles
Loading...
X
Show
Funny
Dev
Pics