序列图逆向工程
我正在寻找一种工具,可以将 Java 逆向工程为序列图,但也提供过滤掉对某些库的调用的能力。
例如,Netbeans IDE 在这方面做得非常出色,但它包含对 String 或 Integer 的所有调用,这会使图表变得混乱,甚至无法使用。
任何帮助是极大的赞赏!!!!!!!
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.
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.
Any help is greatly appreciated!!!!!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(13)
我相信解决您问题的完美工具是 Diver:逆向工程的动态交互视图。 它提供静态和动态序列图,并希望解决您问题中的所有要求。
它是 Eclipse 的一个插件,可让您:
它位于 Github 还有一个 项目网站
完全披露:我是 Diver 的当前项目负责人
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.
It is a plugin for Eclipse and lets you:
It's on Github and there is also a project web site
Full Disclosure: I am the current project lead for Diver
我认为 jtracert 就是您正在寻找的。 它从正在运行的 Java 程序生成序列图。 此外,由于它的输出是图表的文本描述(采用几种流行的 SD 工具的格式),因此您可以使用 grep 来过滤您感兴趣的类。
I think jtracert is 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.
我刚刚开始使用 Sparx Systems Enterprise Architect 中的序列图记录功能。 它对于 C# 非常有效。 您可以按类和方法创建过滤器。 我实际上想知道是否可以过滤掉整个包。 有一个复选框用于自动排除外部模块(如 .NET Framework),这有助于整理。 YMMV for Java,但我认为他们对 Java 的支持(和文档)通常比对 .NET 更好(更多示例)。
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.
MaintainJ 确实是很棒的工具,最近我开始在我的应用程序中使用MaintainJ,它使我的整个使用过程更加舒适,以了解基于Maintainj 序列和维护J 的系统。 UML 图。
我确信对于上述问题,MaintainJ 会给出更好的想法。
谢谢,
克里希纳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.
I am sure for the above question MaintainJ is will give better idea.
Thanks,
Krishna MM
看看 http://www.maintainj.com
不知道,是否可以过滤库调用,但它有一个合理的图形前端,似乎甚至可以跟踪非常大的应用程序。
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.
来自 Sparx 的企业架构师声称能够对 Java 代码进行逆向工程,包括生成序列图 - 请参阅用户指南
看起来它可以记录调试会话并然后你可以从中生成序列图,
我还没有尝试过(尽管已经使用 EA 作为建模工具)所以 ymmv!
可免费下载 30 天评估版
Enterprise architect from Sparx claims to be able to reverse engineer java code including generating sequence diagrams - see this section of the user guide
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!
There is a free 30day evaluation download available
我有一个完全满足您要求的工具。 看看
http://sourceforge.net/projects/javacalltracer/
除了是反向java的工程工具它也是非常轻量级的。 您可以控制要从 java 程序记录的内容。
I have a tool that meets your requirements exactly. Check it out
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.
尝试 MaintainJ。 MaintenanceJ 在运行时为用例生成序列图。 它提供了多种方法来过滤掉不需要的呼叫。 是的,过滤掉不需要的调用是序列图生成工具所需的最重要的功能。 此外,MaintainJ 提供了一个简洁的界面来探索图表并搜索一个用例或跨用例中的调用。
查看演示视频以快速了解。
顺便说一下,我是MaintainJ 的作者。
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.
Check the demo video to get a quick overview.
I am the author of MaintainJ, by the way.
JTracert 现已停止。 他们推荐 http://www.jsonde.com/
JTracert is now discontinued. In place, they recommend http://www.jsonde.com/
Heatlamp (http://www.jmolly.com/heatlamp/) 正是为此目的而设计的。
它通过运行 Java 代码生成交互式(和可打印)图表。 您可以指定过滤器来描述要跟踪哪些类、包和方法。 您还可以在呈现图后搜索、过滤和折叠调用,以进一步缩小序列图。
免责声明:我是《Heatlamp》的作者。
Heatlamp (http://www.jmolly.com/heatlamp/) was designed for exactly this purpose.
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.
Disclaimer: I'm the author of Heatlamp.
JIVE (www.cse.buffalo.edu/jive) 将从 Java 程序的执行构造一个序列图。 它具有排除过滤器功能,允许您排除属于指定类或包的对象。 JIVE可以绘制多线程Java程序执行的时序图。 它还能够在用户指导下在水平和垂直维度上压缩大型图表。
JIVE (www.cse.buffalo.edu/jive) will construct a sequence diagram from the execution of a Java program. It has an Exclusion Filter capability will allow you to exclude objects belonging to designated classes or packages. JIVE can draw sequence diagrams for multi-threaded Java program execution. It also has the ability compact large diagrams in both the horizontal and vertical dimension, under user guidance.
这是阿斯吉尔的答案的补充。 这是我找到的链接。
http://www.java2s.com/Code/Jar/s/sequence。 htm
从命令行运行...“java -jar sequence.jar”...这是一个带有 GUI 的 Java 应用程序。
帮助部分说:
SEQUENCE 是一个用于生成 UML 序列图的程序。 与大多数类似的程序相比,您实际上并不绘制图表。 相反,您可以编写要绘制图表的方法调用的文本描述,然后系统会自动计算和绘制布局。
所以这个工具不会对任何东西进行逆向工程,但我可以看到如果你想从头开始快速绘制图表,它可能会很有帮助。 看起来它是 2002 年构建的,我认为现在可能有更好的工具。
这是另一个类似的工具:
http://sdedit.sourceforge.net/example/index.html
Here's and add-on to Asgeir's answer. Here's the link that I found.
http://www.java2s.com/Code/Jar/s/sequence.htm
Run from the command line ... "java -jar sequence.jar" ... this is a Java application with a GUI.
The help section says:
SEQUENCE is a program for producing UML Sequence Diagrams. In contrast to most similar programs you don't actually draw the diagram. Instead you write a textual description of the method calls you want to diagram and the layout is calculated and drawn automatically.
So this tool doesn't reverse engineer anything, but I can see how it might be helpful if you wanted to quickly diagram things from scratch. Looks like it was built in 2002 and I think there are probably better tools out there now.
Here's another similar tool here:
http://sdedit.sourceforge.net/example/index.html
这看起来是一个非常好的工具:
http://www.architexa.com/learn-more/sequence-diagrams
不过好像只免费一年,然后一年就250美元了。 真糟糕。
我发现 ModelGoon 插件很有帮助。 它有一点限制,因为您选择单个方法作为序列图的起点,并且它仅显示该方法进行的调用(因此要更深入,您需要生成另一个图。)
http://www.modelgoon.org/?page_id=53
This looks like a really nice tool:
http://www.architexa.com/learn-more/sequence-diagrams
But it looks like it's only free for a year, then its $250 a year. Bummer.
I found the ModelGoon plugin to be helpful. It's a bit limited because you choose a single method as the starting point for the sequence diagram, and it only shows the calls that method makes (so to go a level deeper you need to generate another diagram.)
http://www.modelgoon.org/?page_id=53