Home » Modeling » UML2 » org.eclipse.uml2.uml.Type::createAssociation
|org.eclipse.uml2.uml.Type::createAssociation [message #760371]
||Fri, 02 December 2011 03:19
i'm confused a little bit with the strange behaviour, which method
createAssociation has. It's signature is:
Association createAssociation(boolean end1IsNavigable,
I want to explain, what i found strange, using example from this tutorial:
There, classes Supplier and PurchaseOrder are in an association, which
is created with the following call:
AggregationKind.COMPOSITE_LITERAL, "orders", 0,
LiteralUnlimitedNatural.UNLIMITED, purchaseOrderClass, false,
AggregationKind.NONE_LITERAL, "", 1, 1);
If we map actual arguments to formal params of the createAssociation
method, we get
end1 = supplierClass, end1Name = "orders"
end2 = purchaseOrderClass, end2Name = ""
supplierClass.createAssociation(..., end1Name, ..., purchaseOrderClass,
As I understand, it should create an association, where one of the ends,
end1, which represented with supplierClass, has name(role) "orders". But
if we look at the class diagram, we see, that "orders" is assigned to
the another end of the association, end2, that is to purchaseOrderClass.
So, everything get's "inverted" when we think in terms of
Now, the question is, is that really so, is my observation right or wrong?
Thanks in advance
Current Time: Fri May 24 05:46:24 EDT 2013
Powered by FUDForum
. Page generated in 0.01665 seconds