0

I have a Service File in jax-rs that has a method which accepts parameters through @QueryParam Annotation.

The annotation clearly is processed somewhere in the compilation process. Which is the class that performs the modification operation? Like for QueryParam to fetch Parameters from the URL.

@PUT
@Path("/score")
@Produces("application/json")
public String update(@QueryParam("wins") int wins, 
                        @QueryParam("losses") int losses, 
                        @QueryParam("ties")   int ties) {
   Hello.wins   = wins;
   Hello.ties   = ties;
   Hello.losses = losses;
   String pattern = 
      "{ \"wins\":\"%s\", \"losses\":\"%s\", \"ties\": \"%s\"}";
   return String.format(pattern,  Hello.wins, Hello.losses, Hello.ties );   
}
  • 1
    Possible duplicate of [How do annotations like @Override work internally in Java?](https://stackoverflow.com/questions/18189980/how-do-annotations-like-override-work-internally-in-java) – Artion Hasani Jun 25 '19 at 13:39
  • I just want to get the source of the PathParam or QueryParam annotatio Processor to change the way they behave – Shri Kumar Jun 26 '19 at 05:33

1 Answers1

0

Thanks, I found the solution myself. There are InjectableProvider classes for each annotation present in the jersey library which process the incoming annotations.