Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsing Java Class From Perl or Python

I want to get a .java file, recognize the first class in the file, and get information about annotations, methods and attributes from this class.

Is there any module in both languages that already does that? I could build up a simple regexp to do it also, but I don't known how to recognize in the regexp the braces indicating the end of the class/method.

like image 683
Rafael Avatar asked Nov 06 '22 11:11

Rafael


1 Answers

If you load the java classes inside Jython you probably could use introspection to find the information you need.

like image 87
Mad Scientist Avatar answered Nov 11 '22 04:11

Mad Scientist