Help: how can get method, arg, return type... from a file .class
This is the first time I visit this forum, and I hope I will receive all bros 's advices.
This is my matter:
I have a problem in taking method, args, return type from a file .class of Java. For example, from this file : A.java
public int add(int a, int b);
It will be compiled into A.class. I only have file A.class. And i must write java code to create a tool, input is compiled file A.class, output is :
arg: "a" (int)
arg: "b" (int)
of courses this is a simple example.
I 've read program translate from file .class to file .java at link :
, and this is source code in C++
. In that program, they read file .class in binary, and translate each byte. But with me, this is so complex :(:(
I want to ask, is there another way to get method, args, ... from file .class without read file .class in binary?
And who can give me some sample of source code to solve this problem?
Thanks for reading and answering a lot.