View Javadoc
1   package org.andromda.metafacades.uml14;
2   
3   import java.util.Collections;
4   import java.util.List;
5   import org.andromda.metafacades.uml.OperationFacade;
6   import org.omg.uml.behavioralelements.statemachines.CallEvent;
7   import org.omg.uml.foundation.core.Operation;
8   
9   /**
10   * MetafacadeLogic implementation.
11   *
12   * @see org.andromda.metafacades.uml.CallEventFacade
13   * @author Bob Fields
14   */
15  public class CallEventFacadeLogicImpl
16      extends CallEventFacadeLogic
17  {
18      private static final long serialVersionUID = 2227288018254321367L;
19  
20      /**
21       * @param metaObject
22       * @param context
23       */
24      public CallEventFacadeLogicImpl(
25          CallEvent metaObject,
26          String context)
27      {
28          super(metaObject, context);
29      }
30  
31      /**
32       * @see org.andromda.metafacades.uml.CallEventFacade#getOperation()
33       */
34      @Override
35      public Operation handleGetOperation()
36      {
37          return metaObject.getOperation();
38      }
39  
40      /**
41       * @see org.andromda.metafacades.uml.CallEventFacade#getOperations()
42       */
43      @Override
44      protected List<OperationFacade> handleGetOperations()
45      {
46          final OperationFacade operation = this.getOperation();
47          return operation == null ? Collections.<OperationFacade>emptyList() : Collections.singletonList(operation);
48      }
49  }