Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find the name of a java object

Status
Not open for further replies.

rajarajan

Programmer
Jul 16, 2001
33
IN
Hi,
I've got a Java object with me.
I'm able to find the name of the class of which it is an instance, the attributes of that object etc., using the reflect package.
But how is it that I find the actual name of that object.

Regards,
Rajan
 
I am not sure how to getting an object name. You can accomplish what ever you want to do on the object. You can assign this object to another object and work on that object. It will copy the memory address only.
 
If you think of the name of the identifier in the original source, then I must dissapoint you. It is lost during compiling. Go and get a look at some Java Virtual Machine internals at sun's java site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top