UML inner/nested class associations
- From: "VisionSet" <spam@xxxxxxxxxxxx>
- Date: Thu, 20 Apr 2006 13:26:13 GMT
If you have an inner class that creates stateless objects then you can do
this in a number of ways.
1/ A nested class, Objects of the class can be composed attributes of outer
object.
2/ A nested class, Objects of the class are just instantiated in method
scope.
3/ An inner class declared in a method. Objects are just instantiated in
method scope.
In UML only 1/ can be shown as a composisition (?) association although the
designed effect is the same.
How can I legally show relationships in the other cases? At the moment I'm
using notes & note anchors. I was using the dotted instantiates/dependency
relationship, but I now realise that is misuse.
Can you show relationships for method local objects at all?
I expect the answer might be, 'this is what sequence diagrams are for'.
Also when naming associations, does the naming direction go in the direction
of a one way association by default? I believe you can have it in either
direction, but there is no visual way to indicate direction? How can you
read direction in 2 way associations? Also my names seem a bit over-long eg
'connects to database via'.
example here:
http://img126.imageshack.us/img126/5078/dao4bv.gif
Nested class is RowHandler, a locally used object is DAOException.
TIA,
Mike W
.
- Follow-Ups:
- Re: UML inner/nested class associations
- From: H. S. Lahman
- Re: UML inner/nested class associations
- Prev by Date: Re: Question on LSP
- Next by Date: Question on Effective Java Item 27
- Previous by thread: UML Structured class with utility parts?
- Next by thread: Re: UML inner/nested class associations
- Index(es):
Relevant Pages
|