Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

Getting parameter names through reflection

Thread view: 
cyberco - 20 Apr 2006 13:09 GMT
Is it possible to get parameter names through reflection? From a class
file reflection enables me to get methods and their types of
parameters:

public void foo(int);

But I would like to now the name for the int parameter.

It seems like Eclipse is able to pull this off for its debugging mode,
I wonder how.
Chris Uppal - 20 Apr 2006 13:36 GMT
> Is it possible to get parameter names through reflection?

No.

/If/ you have access to the .class files, and /if/ they were compiled with
variable name tables included (part of the debugging info), and /if/ you are
willing to parse the classfile to find and interpret the tables (there are
several helper libraries available), then you can get the information that way.

   -- chris


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.