Retrieving multiplicity from an association

Hello,

I am writing a plugin that generates the documentation of a model in xml and pdf format. When I want to export associations and generalizations between classes I need to retrieve the multiplicities of the classes at the ends of the association or generalization but I cannot find any method that allows me to do it.
Actually I am also a bit confused about IEndRelationship, IRelationshipEnd, IAssociationEnd, etc.

Could you please give me some advice?
Thank you in advance.

Dear aaron_sama,

Generalization does not have multiplicity

Association’s multiplicity is represented in its From/To AssociationEnd
sample:
IAssociation association = …;
// from
IAssociationEnd associationEnd = (IAssociationEnd) association.getFromEnd();
String multiplicity = associationEnd.getMultiplicity();
IMultiplicity multiplicityDetail = associationEnd.getMultiplicityDetail();
multiplicityDetail.isOrdered();
multiplicityDetail.isUnique();
// to

Best regards,
Jick