简体   繁体   English

序列图逆向工程

[英]Sequence Diagram Reverse Engineering

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!!!!!!! 任何帮助是极大的赞赏!!!!!!!

I believe the perfect tool to solve your problem is Diver: Dynamic Interactive Views For Reverse Engineering. 我相信解决您问题的完美工具是Diver:逆向工程的动态交互式视图。 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: 它是Eclipse的插件,可以让你:

  • Easily trace your Java programs 轻松跟踪Java程序
  • Visualize your program's runtime functionality 可视化程序的运行时功能
  • Filter your traces to make them more compact 过滤您的痕迹,使其更紧凑
  • Filter your IDE based on what occurs at runtime 根据运行时发生的情况过滤IDE
  • See what code ran in your source code editors 查看源代码编辑器中运行的代码

It's on Github and there is also a project web site 它在Github上 ,还有一个项目网站

Full Disclosure: I am the current project lead for Diver 完全披露:我是潜水员目前的项目负责人

Try MaintainJ . 试试MaintainJ MaintainJ generates sequence diagrams at runtime for a use case. MaintainJ在运行时为用例生成序列图。 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提供了一个简洁的界面来探索图表并在一个用例或用例中搜索调用。

Check the demo video to get a quick overview. 查看演示视频以获得快速概述。

I am the author of MaintainJ, by the way. 顺便说一句,我是MaintainJ的作者。

I think jtracert is what you are looking for. 我认为jtracert就是你要找的东西。 It generates a sequence diagram from a running Java program. 它从正在运行的Java程序生成序列图。 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. 此外,因为它的输出是图表的文本描述(以几种流行的SD工具的格式),您可以使用grep仅过滤您感兴趣的类。

JTracert is now discontinued. JTracert现已停产。 In place, they recommend http://www.jsonde.com/ 到位,他们推荐http://www.jsonde.com/

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. 除了作为java的逆向工程工具之外,它还非常轻量级。 You can control the what you want to record from your java program. 您可以从java程序中控制要记录的内容。

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. 它通过运行Java代码生成交互式(和可打印的)图表。 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. 免责声明:我是Heatlamp的作者。

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. 我相信上面的问题,MaintainJ会给出更好的主意。 Thanks, Krishna MM 谢谢,克里希纳MM

Enterprise architect from Sparx claims 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天评估下载

Take a look at http://www.maintainj.com 看看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. 它不知道,它是否可以过滤库调用,但它有一个合理的图形前端,似乎跟踪甚至非常大的应用程序。

I have just started using the sequence diagram recording feature in Sparx Systems Enterprise Architect. 我刚刚开始使用Sparx Systems Enterprise Architect中的序列图记录功能。 It works very well for C#. 它对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. 有一个用于自动排除外部模块(如.NET Framework)的复选框,它有助于整理。 YMMV for Java, but I think their support (and documentation) for Java is generally better (more examples) than for .NET. YMMV for Java,但我认为他们对Java的支持(和文档)通常比.NET更好(更多示例)。

Here's and add-on to Asgeir's answer. 这是Asgeir答案的附加内容。 Here's the link that I found. 这是我找到的链接。

http://www.zanthan.com/ajm/sequencev7/sequence.jar http://www.zanthan.com/ajm/sequencev7/sequence.jar

Run from the command line ... "java -jar sequence.jar" ... this is a Java application with a GUI. 从命令行运行...“java -jar sequence.jar”...这是一个带有GUI的Java应用程序。

The help section says: SEQUENCE is a program for producing UML Sequence Diagrams. 帮助部分说:SEQUENCE是一个用于生成UML序列图的程序。 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. 看起来它建于2002年,我认为现在可能有更好的工具。

Here's another similar tool here: http://sdedit.sourceforge.net/example/index.html 这是另一个类似的工具: http//sdedit.sourceforge.net/example/index.html

This looks like a really nice tool: http://www.architexa.com/learn-more/sequence-diagrams 这看起来是一个非常好的工具: http//www.architexa.com/learn-more/sequence-diagrams

But it looks like it's only free for a year, then its $250 a year. 但它看起来只有一年免费,然后是每年250美元。 Bummer. 游民。


I found the ModelGoon plugin to be helpful. 我发现ModelGoon插件很有帮助。 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 http://www.modelgoon.org/?page_id=53

JIVE (www.cse.buffalo.edu/jive) will construct a sequence diagram from the execution of a Java program. JIVE(www.cse.buffalo.edu/jive)将根据Java程序的执行构建一个序列图。 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. JIVE可以绘制多线程Java程序执行的序列图。 It also has the ability compact large diagrams in both the horizontal and vertical dimension, under user guidance. 在用户指导下,它还具有水平和垂直尺寸的紧凑大图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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