Is it possible to represent this case on a sequence diagram? If yes, how? Is the newly created object represented as an absolutely new object?

Thank you for reading and replying !

有帮助吗?

解决方案

The simplest answer is yes. If it's a new object, it's a new object. Different from the other one. It may have the same name but it has different identity. So it just becomes a new object with its own lifeline on the sequence diagram.

hth.

其他提示

When an object is destroyed its lifeline is also destroyed which means it is non-existent after that, so you can obviously create a new object with that name.But try to avoid creating objects with same name which run in parallel because that will invoke conflicts.Creating objects with the name of a persistent object may also give rise to conflicts.To represent it on a sequence diagram just draw an object with its own lifeline.Make sure to start the interactions after the previous object's "destruction".

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top