从源代码对 Java 进行逆向工程记录很少

发布于 2024-11-15 12:25:25 字数 1539 浏览 9 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

奶气 2024-11-22 12:25:25

Michael Feathers 所著的《有效处理遗留代码》一书可能比我们在此告诉您的任何内容都更能帮助您。

然而,您需要自己澄清的最重要的事情(从您的问题来看似乎并不完全清楚)是:您的目标是什么?您想通过此代码库实现什么目标?

如果答案是(听起来)“能够有效地维护现有项目”,那么尝试直接构建系统的完整高层模型可能不是最有效的路径。可能一次性记住的事情太多了。

在这种情况下,我会尝试仅了解您当前需要修改的系统的用例;通过代码跟踪方法调用(可能在正在运行的系统上使用调试器)以查看涉及哪些部分。对几个不同的用例执行此操作,您将开始看到模式,然后记录这些模式并逐渐将它们组合到系统的高级映像中。

The book "Working Effectively with Legacy Code" by Michael Feathers will probably help you more than anything we can tell you here.

However, the most important thing you need to clarify for yourself (and from your question it sounds like it's not completely clear) is this: what is your goal? What do you want to achieve with this codebase?

If the answer is (as it sounds) "being able to effectively maintain the existing project", then trying to directly build a complete high-level model of the system may not be the most effective path. It's probably just too much at once to keep in mind.

In this case, I would try to understand only the use cases of the system that you currently need to modify; follow method calls through the code (pssibly using a debugger on the running system) to see what parts are involved. Do this for a few different use cases and you'll start to see patterns, then document those and gradually fit them together into a high-level image of the system.

神也荒唐 2024-11-22 12:25:25

此工具可能为您提供帮助。

或者,如果遗留系统写得不好,它可能会造成巨大的难以阅读的混乱,但我希望它有所帮助。

This tool might assist you.

Or if the legacy system is written poorly it could just make a huge unreadable mess, but I hope it helps.

皇甫轩 2024-11-22 12:25:25

如果它是java代码,那么深度逆向工程将非常有帮助。
请参阅文档:http://www.ejb3.org/jar_file_reverse/jar_file_reverse.html

If it is a java code then a deep reverse engineering would be very helpful.
See a documentation at: http://www.ejb3.org/jar_file_reverse/jar_file_reverse.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文