UML 图:带有类实例说明的自反关联 [英] UML Diagram: Reflexive Association with class instance clarification

查看:50
本文介绍了UML 图:带有类实例说明的自反关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Eclipse Neon 中使用了一个名为 ObjectAid 的插件,它是一个自动生成 UML 图的插件.

I used a plug-in in Eclipse Neon which is called ObjectAid, it's a plug-in that generates a UML Diagram automatically.

现在我理解了生成的 UML 中的所有内容,除了一件事,即箭头~class instance"旁边的标签.那部分是什么意思?

Now I understand everything in the generated UML except for one thing, which is the label next to the arrow "~class instance". What does that part mean?

这只是生成的 UML 的相同图像,而不是真实图像,因此请理解这只是一个示例.

This is just an identical image, not the real one, of the UML generated so please understand that that's just an example.

//more codes here
static APAGenerator generateAPA = new APAGenerator();

public static void main(String[] args) {
    try {
        generateAPA.run();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
//more codes here

推荐答案

好吧,我不能说这个 ObjectAid(以及他们的制造者认为他们应该做什么),但根据 UML 规范,~ 告诉可见性是 package ,然后是关联所采用的角色名称(IOW:正在使用的属性).所以名字是class instance,这看起来很奇怪.

Well, I can't speak for this ObjectAid (and what their makers thought they should do), but as per UML specification the ~ tells the visibility is package and it's followed by the role name which the association takes (IOW: the attribute being used). So the name is class instance which seems odd.

这篇关于UML 图:带有类实例说明的自反关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆