Alex Rivera | Logout

Programmatically inspect .class files

Asked 2008-10-02T20:20:53.083
15

I'm working on a project where we're doing a lot of remote object transfer between a Java service and clients written in other various languages. Given our current constraints I've decided to see what it would take to generate code based on an existing Java class. Basically I need to take a .class file (or a collection of them) parse the bytecode to determine all of the data members and perhaps getters/setters and then write something that can output code in a different language to create a class with the same structure.

I'm not looking for standard decompilers such as JAD. I need to be able to take a .class file and create an object model of its data members and methods. Is this possible at all?

Edit
Report

1 Answer

1

I have used BCEL in the past and it was pretty easy to use. It was a few years ago so there may be something better now.

Apache Jakarta BCEL

answered 2008-10-02T20:22:40.943

Your Answer