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 );
}