001package org.andromda.metafacades.uml14;
002
003import java.util.Collection;
004import java.util.Collections;
005import org.andromda.metafacades.uml.InstanceFacade;
006import org.omg.uml.behavioralelements.commonbehavior.Instance;
007import org.omg.uml.behavioralelements.commonbehavior.Link;
008import org.omg.uml.foundation.core.AssociationEnd;
009import org.omg.uml.behavioralelements.commonbehavior.LinkEnd;
010
011/**
012 * MetafacadeLogic implementation for org.andromda.metafacades.uml.LinkEndFacade.
013 *
014 * @see org.andromda.metafacades.uml.LinkEndFacade
015 * @author Bob Fields
016 */
017public class LinkEndFacadeLogicImpl
018    extends LinkEndFacadeLogic
019{
020    private static final long serialVersionUID = 4827547532134623488L;
021
022    /**
023     * @param metaObject
024     * @param context
025     */
026    public LinkEndFacadeLogicImpl (LinkEnd metaObject, String context)
027    {
028        super (metaObject, context);
029    }
030
031    /**
032     * @see org.andromda.metafacades.uml.LinkEndFacade#getInstance()
033     */
034    @Override
035    protected Instance handleGetInstance()
036    {
037        return metaObject.getInstance();
038    }
039
040    /**
041     * @see org.andromda.metafacades.uml.LinkEndFacade#getAssociationEnd()
042     */
043    @Override
044    protected AssociationEnd handleGetAssociationEnd()
045    {
046        return metaObject.getAssociationEnd();
047    }
048
049    /**
050     * @see org.andromda.metafacades.uml.LinkEndFacade#getLink()
051     */
052    @Override
053    protected Link handleGetLink()
054    {
055        return metaObject.getLink();
056    }
057
058    /**
059     * @see org.andromda.metafacades.uml.LinkEndFacade#getInstances()
060     */
061    @Override
062    protected Collection<InstanceFacade> handleGetInstances()
063    {
064        return Collections.singleton(this.getInstance());
065    }
066}