Java 序列图逆向工程
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/87137/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Sequence Diagram Reverse Engineering
提问by Keith Fitzgerald
I'm looking for a tool that will reverse engineer Java into a sequence diagram BUT also provides the ability to filter out calls to certain libraries.
我正在寻找一种工具,可以将 Java 逆向工程为序列图,但还提供过滤掉对某些库的调用的能力。
For example, the Netbeans IDE does a fantastic job of this but it includes all calls to String or Integer which clutter up the diagram to the point it is unusable.
例如,Netbeans IDE 在这方面做得非常出色,但它包括对 String 或 Integer 的所有调用,这些调用使图表混乱到无法使用的程度。
Any help is greatly appreciated!!!!!!!
任何帮助是极大的赞赏!!!!!!!
采纳答案by Steve Hanov
I think jtracertis what you are looking for. It generates a sequence diagram from a running Java program. Also, because its output is a text description of the diagram (in the formats of several popular SD tools), you can use grep to filter for only the classes you are interested in.
我认为jtracert是您正在寻找的。它从正在运行的 Java 程序生成一个序列图。此外,因为它的输出是图表的文本描述(采用几种流行的 SD 工具的格式),您可以使用 grep 仅过滤您感兴趣的类。
回答by Richard
Enterprise architect from Sparxclaims to be able to reverse engineer java code including generating sequence diagrams - see this section of the user guide
Sparx 的企业架构师 声称能够对 Java 代码进行逆向工程,包括生成序列图 - 请参阅用户指南的这一部分
It looks like it can record a debugging session and then you generate the sequence diagram from that
看起来它可以记录调试会话,然后您从中生成序列图
I've not tried it (though have used EA as a modelling tool) so ymmv!
我还没有尝试过(虽然使用 EA 作为建模工具)所以 ymmv!
There is a free 30day evaluation download available
提供 30 天免费评估下载
回答by ralf
Take a look at http://www.maintainj.com
It don't know, whether it can filter library calls, but it has a reasonable graphical front end and seems to trace even very large applications.
它不知道它是否可以过滤库调用,但它有一个合理的图形前端,似乎甚至可以跟踪非常大的应用程序。
回答by ralf
I have just started using the sequence diagram recording feature in Sparx Systems Enterprise Architect. It works very well for C#. You can create filters by class and by method. I'm actually trying to find out if it's possible to filter out an entire package. There is a checkbox for automatically excluding external modules (like the .NET Framework) which aids in declutter. YMMV for Java, but I think their support (and documentation) for Java is generally better (more examples) than for .NET.
我刚刚开始使用 Sparx Systems Enterprise Architect 中的序列图记录功能。它适用于 C#。您可以按类和方法创建过滤器。我实际上试图找出是否可以过滤掉整个包。有一个复选框用于自动排除外部模块(如 .NET Framework),有助于整理。YMMV for Java,但我认为他们对 Java 的支持(和文档)通常比对 .NET 更好(更多示例)。
回答by Ali Naqvi
I have a tool that meets your requirements exactly. Check it out
我有一个完全符合您要求的工具。一探究竟
http://sourceforge.net/projects/javacalltracer/
http://sourceforge.net/projects/javacalltracer/
In addition to being a reverse engineering tool for java it is also very lightweight. You can control the what you want to record from your java program.
除了作为 Java 的逆向工程工具之外,它还非常轻量级。您可以从 Java 程序中控制要记录的内容。
回答by RAbraham
JTracert is now discontinued. In place, they recommend http://www.jsonde.com/
JTracert 现已停产。到位,他们推荐http://www.jsonde.com/
回答by Choudary Kothapalli
Try MaintainJ. MaintainJ generates sequence diagrams at runtime for a use case. It provides multiple ways to filter out unwanted calls. Yes, filtering out unwanted calls is the most important feature needed in sequence diagram generating tools. Besides, MaintainJ provides a neat interface to explore the diagram and search for calls in one use case or across use cases.
尝试MaintainJ。MaintainJ 在运行时为用例生成序列图。它提供了多种方法来过滤掉不需要的电话。是的,过滤掉不需要的调用是序列图生成工具所需的最重要的功能。此外,MaintainJ 提供了一个简洁的界面来探索图表并在一个用例或跨用例中搜索调用。
Check the demo videoto get a quick overview.
查看演示视频以获得快速概览。
I am the author of MaintainJ, by the way.
顺便说一下,我是MaintainJ 的作者。
回答by aaron
Heatlamp (http://www.jmolly.com/heatlamp/) was designed for exactly this purpose.
Heatlamp ( http://www.jmolly.com/heatlamp/) 正是为此目的而设计的。
It generates interactive (and printable) diagrams from running Java code. You can specify filters to describe which classes, packages, and methods to trace. You can also search, filter, and collapse invocations after the diagram is rendered to further reduce the sequence diagram.
它通过运行 Java 代码生成交互式(和可打印)图表。您可以指定过滤器来描述要跟踪的类、包和方法。您还可以在图呈现后搜索、过滤和折叠调用,以进一步缩小序列图。
Disclaimer: I'm the author of Heatlamp.
免责声明:我是 Heatlamp 的作者。
回答by Krishna MM
MaintainJ is really wonderful tool, Recently i was started to use with MaintainJ with my application it is giving more comfort with my entire usage to understand my system based on Maintainj sequence & UML diagrams.
MaintainJ 是一个非常棒的工具,最近我开始在我的应用程序中使用MaintainJ,它让我在整个使用过程中更加舒适,以了解基于Maintainj 序列和UML 图的系统。
I am sure for the above question MaintainJ is will give better idea. Thanks, Krishna MM
我相信对于上述问题,MaintainJ 会给出更好的主意。谢谢,克里希纳 MM
回答by Sean
I believe the perfect tool to solve your problem is Diver: Dynamic Interactive Views For Reverse Engineering. It provides both static and dynamic sequence diagrams and looks to solve all your requirements from your question.
我相信解决您问题的完美工具是 Diver: Dynamic Interactive Views For Reverse Engineering。它提供静态和动态序列图,并希望从您的问题中解决您的所有要求。
It is a plugin for Eclipse and lets you:
它是 Eclipse 的插件,可让您:
- Easily trace your Java programs
- Visualize your program's runtime functionality
- Filter your traces to make them more compact
- Filter your IDE based on what occurs at runtime
- See what code ran in your source code editors
- 轻松跟踪您的 Java 程序
- 可视化程序的运行时功能
- 过滤你的痕迹,使它们更紧凑
- 根据运行时发生的情况过滤您的 IDE
- 查看您的源代码编辑器中运行的代码
It's on Githuband there is also a project web site
Full Disclosure: I am the current project lead for Diver
全面披露:我是 Diver 目前的项目负责人