[英]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. 您正在寻找一个反编译器,以及将该工具的AST表示转换为Eclipse的AST表示的方法。
Java Decompiler has an Eclipse plugin to re-create source code. Java Decompiler有一个Eclipse插件来重新创建源代码。 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). 您可以使用Eclipse的ASTParser
解析它以获得您想要的AST(或者您可能只是想要开始源代码)。
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? 那么Eclipse ASTParser如何处理呢? 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. 有许多用于Java的反编译器 ,它们具有不同的能力,具体取决于编译器/混淆器,它创建了它试图反编译的字节码。 If Java Decompiler doesn't work for you, you might create an eclipse plugin for one of the others. 如果Java Decompiler不适合您,您可以为其他人创建一个eclipse插件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.