I need tools to:
-
Conveniently parse Java source code and easily access given elements.
-
Easily generate source code files, to easily transform data structures into code
Any good tips, libraries, frameworks, tools? Thank you for help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since Java 6, the compiler has an API included in the JDK. Through it you can access the results of the Java parser through the
javax.lang.modelAPIs. The same functionality was present with JDK5 in the form of the Mirror API. There’s a good introductory article here.The best code generation tool I’ve seen is CodeModel. It has a very simple API and can generate multiple Java source files at once.