• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Data structure for reflection uses (pairs of String and String[])

 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
My business logic lies behind a web service. So the remote client calls the methods of the service. The client passes string from which the server extract name of the method and arguments. So I need a data structure to store the name (string) of the method and the arguments (String[]) pairs. So I need some thing like map but the keys shouldn't be unique (the keys would be the names of the methods).
Any ideas?

Thanks.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not quite sure, but method calling via reflection is different from that; you get Method objects and invoke them with Object[] for their arguments. I presume you are familiar with the Java reflection API?
I don't think there is such a thing as a Map which permits duplicate Keys; you would have to encapsulate Method and arguments into a single class, then they might sit nicely in a Set.
 
reply
    Bookmark Topic Watch Topic
  • New Topic