private void getTargetAssociationReference(AssociationEndCallExp exp, CoreAssociationEnd associationEnd, out string otherTypeName, out string otherKeyName, out string otherName, out string typeName, out string name)
        {
            var otherType = associationEnd.getType();

            otherTypeName = otherType.getName();

            var otherKeyAttribute =
                (CoreAttributeImpl)otherType.getAllAttributes().FirstOrDefault(a => ((CoreAttributeImpl)a).hasStereotype("Id")) ??
                (CoreAttributeImpl)otherType.getAllAttributes().FirstOrDefault();

            otherKeyName = otherKeyAttribute != null?otherKeyAttribute.getName() : "";

            var participant         = associationEnd.getTheParticipant();
            var association         = associationEnd.getAssociation();
            var otherAssociationEnd = (CoreAssociationEndImpl)association.getTheAssociationEnds(participant).FirstOrDefault();

            otherName = otherAssociationEnd != null?otherAssociationEnd.getName() : "";

            var expsource = (VariableExp)exp.getSource();
            var variable  = expsource.getReferredVariable();
            var type      = variable.getType();

            typeName = type.getName();

            var keyAttribute =
                (CoreAttributeImpl)type.getAllAttributes().FirstOrDefault(a => ((CoreAttributeImpl)a).hasStereotype("Id")) ??
                (CoreAttributeImpl)type.getAllAttributes().FirstOrDefault();

            name = keyAttribute != null?keyAttribute.getName() : "";
        }
 public CoreClassifier getExpressionType(OclExpression source, CoreAssociationEnd associationEnd)
 {
     return(base.getExpressionType(source.getType(), associationEnd, associationEnd.getTheParticipant()));
 }