在UML2中是否有类型化的java集合的标准表示?我正在做一个类图,当使用像Map这样的东西作为类属性的类型时,我希望避免Java语法。
- foo : Map<Integer, String>发布于 2010-08-19 15:57:35
UML2具有parameterized classes,其语法实际上与Java的语法几乎相同--Java和UML2的灵感都来自于这里的C++语法。
发布于 2010-08-19 15:59:12
我反对使用过多的设计文档来编程。文档只是用来交流思想的,我知道。
因此,如果您的UML需要Java类型,则可能是:
使用UML
- if the types are primitive: it's likely you don't need to express internal data structures in UML. You only need to express what's the responsibility of the class.
- if the types are objects: ok, maybe it's the point... I'm not sure, but try to use the minimum...
https://stackoverflow.com/questions/3519749
复制相似问题