Suppose I have a function
public int doSomething(@QueryParam("id") String name, int x){ .... }
How can I find the type of the annotated parameter 'name'. I have a handle to the java.lang.reflect.Method
instance of the function doSomething and using the function getParameterAnnotations()
, I can obtain the annotation @QueryParam
but am not able to access the parameter on which it is applied on. How do I do this ?