简体   繁体   中英

Is there a Java Bytecode to Eclipse AST parser?

你能推荐一些库提供Java字节码作为Eclipse的Java AST(即节点从org.eclipse.jdt.core.dom.ASTNode下降)吗?

You're looking for a decompiler, and a way to turn that tool's AST representation into Eclipse's AST representation.

Java Decompiler has an Eclipse plugin to re-create source code. You could parse that with Eclipse's ASTParser to get the AST you want (or maybe you just wanted the source code to begin with).

The biggegst roadblock you'll run into is when the decompiler cannot accurately re-create original source code syntax (either because of obfuscation or because it simply cannot understand a bytecode construct). What sourcecode does it generate? How then does the Eclipse ASTParser handle that? YMMV.

There are many decompilers for Java , all with varying abilities depending on the compiler/obfuscator which created the bytecode it is attempting to decompile. If Java Decompiler doesn't work for you, you might create an eclipse plugin for one of the others.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM