View Javadoc
1   package org.andromda.metafacades.uml14;
2   
3   import java.util.Collection;
4   import java.util.Collections;
5   import org.andromda.metafacades.uml.InstanceFacade;
6   import org.omg.uml.behavioralelements.commonbehavior.Instance;
7   import org.omg.uml.behavioralelements.commonbehavior.Link;
8   import org.omg.uml.foundation.core.AssociationEnd;
9   import org.omg.uml.behavioralelements.commonbehavior.LinkEnd;
10  
11  /**
12   * MetafacadeLogic implementation for org.andromda.metafacades.uml.LinkEndFacade.
13   *
14   * @see org.andromda.metafacades.uml.LinkEndFacade
15   * @author Bob Fields
16   */
17  public class LinkEndFacadeLogicImpl
18      extends LinkEndFacadeLogic
19  {
20      private static final long serialVersionUID = 4827547532134623488L;
21  
22      /**
23       * @param metaObject
24       * @param context
25       */
26      public LinkEndFacadeLogicImpl (LinkEnd metaObject, String context)
27      {
28          super (metaObject, context);
29      }
30  
31      /**
32       * @see org.andromda.metafacades.uml.LinkEndFacade#getInstance()
33       */
34      @Override
35      protected Instance handleGetInstance()
36      {
37          return metaObject.getInstance();
38      }
39  
40      /**
41       * @see org.andromda.metafacades.uml.LinkEndFacade#getAssociationEnd()
42       */
43      @Override
44      protected AssociationEnd handleGetAssociationEnd()
45      {
46          return metaObject.getAssociationEnd();
47      }
48  
49      /**
50       * @see org.andromda.metafacades.uml.LinkEndFacade#getLink()
51       */
52      @Override
53      protected Link handleGetLink()
54      {
55          return metaObject.getLink();
56      }
57  
58      /**
59       * @see org.andromda.metafacades.uml.LinkEndFacade#getInstances()
60       */
61      @Override
62      protected Collection<InstanceFacade> handleGetInstances()
63      {
64          return Collections.singleton(this.getInstance());
65      }
66  }