SHARE
TWEET

Untitled

a guest Oct 12th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Path("/app/{resource}")    //Suppose resource comes as Apple or Mango.
  2. @Produces(value=MediaType.APPLICATION_JSON)    
  3. public class AppResource {
  4.  
  5.     @GET
  6.     public Response getResource(@PathParam("resource") String resource) {
  7.     // Here want to convert resource to Apple or Mango class so that I can create a List<Apple> or List<Mango>.
  8.     }
  9. }
RAW Paste Data
Top