aspose file tools*
The moose likes Java in General and the fly likes javap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "javap" Watch "javap" New topic
Author

javap

vishwas bhatt
Ranch Hand

Joined: Nov 30, 2000
Posts: 129
Hi everybody,
Can any body tell me that by using javap can i get the only Fields list in specified class.
or is there any other method.
except refelection API.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I'm not exactly certain what you're asking, but according to javap - The Java Class File Disassembler on java.sun.com:
"javap prints out the ... fields and methods of the classes passed to it."


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
vishwas bhatt
Ranch Hand

Joined: Nov 30, 2000
Posts: 129
thanx !
ya that i know that we can get the methods and fields list from javap for specific class.
but i need only fields it is just because i want to this for each and every class in java for creating Jtree.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
If you're looking to not get the methods, then I don't believe that can be done with javap alone. You could use javap and then parse the output to just get the non-method data. For instance, if the line contained a "(", then ignore that line.
Good Luck.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javap