• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Java reflection JSON launcher "discussion"

Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here i'm asking for your opinion about this code and possible improvements or errors you may see. (only limitation i'm aware of is i can't have multiple methods with the same name on the class), also don't know if this is the correct forum to post this, if not, please move the post accordingly please.

I've developed (i think) a function launcher from a JSON string
The Json string is something like this.

method specifies which method i want to execute, service specifies which class contains that method, and params contains the parameters for the method.

In this case i want to execute a method like this "public Object methodName(Object1 ob, List<Object2> ob)"

The launcher code is something like this.

I hope you find this useful on the future, and thanks in advance for your answers.
Saloon Keeper
Posts: 14018
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you suppressing unchecked warnings? You should be using properly parameterized types.

You might be interested in the JAX-B and JAX-WS specifications that deal with object to XML bindings and XML method invocation respectively.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic