Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get java class name pragmatically in any java program?

 
aditya anurag
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get java class name pragmatically in any java program???
-This is my question if any one having any knowledge regarding this plzz reply....!!!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34423
347
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

Assuming you are in an instance method, you can use reflection to get the name of the current class:


If this isn't what you are looking for, please elaborate.
 
aditya anurag
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

thanks for your valuable reply.......
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic