aspose file tools*
The moose likes Java in General and the fly likes How to get java class name pragmatically in any java program? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to get java class name pragmatically in any java program?" Watch "How to get java class name pragmatically in any java program?" New topic
Author

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

aditya anurag
Greenhorn

Joined: Sep 23, 2012
Posts: 3
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30512
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
aditya anurag
Greenhorn

Joined: Sep 23, 2012
Posts: 3

thanks for your valuable reply.......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get java class name pragmatically in any java program?