Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Not quite an Attribute, not quite a Method. Stereotypes? <<get>> <<set>>?


I'm retro-modelling an existing system, so I need to clearly reflect that this is not the same as a readonly field or a methods pair (regardless of what the IL says), so I think I'll go with the stereotype, but I'll accept the language independant get_ set_ as a general solution. Thanks all for the sanity test.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
348 views
Welcome To Ask or Share your Answers For Others

1 Answer

I usually prepare my UML diagrams in Visio (I know, I know; but what're ya gonna do?).

When diagramming properties, they end up as so:

+------------------------+
| MyClass                |
|------------------------|
| - _foo : int           |
|------------------------|
| ?property? + Foo : int |
+------------------------+

?property? being a custom stereotype derived from ?operator?.

Ugly, I know. But it works, and it's clear. I do constructors the same way.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...