View Javadoc
1   package org.andromda.metafacades.uml14;
2   
3   import org.omg.uml.behavioralelements.activitygraphs.ObjectFlowState;
4   import org.omg.uml.behavioralelements.statemachines.CompositeState;
5   import org.omg.uml.behavioralelements.statemachines.StateMachine;
6   import org.omg.uml.foundation.core.Classifier;
7   
8   /**
9    * Metaclass facade implementation.
10   * @author Bob Fields
11   */
12  public class ObjectFlowStateFacadeLogicImpl
13      extends ObjectFlowStateFacadeLogic
14  {
15      private static final long serialVersionUID = 744240821518303756L;
16  
17      /**
18       * @param metaObject
19       * @param context
20       */
21      public ObjectFlowStateFacadeLogicImpl(
22          ObjectFlowState metaObject,
23          String context)
24      {
25          super(metaObject, context);
26      }
27  
28      /**
29       * @see org.andromda.metafacades.uml14.StateVertexFacadeLogicImpl#handleGetStateMachine()
30       */
31      @Override
32      protected StateMachine handleGetStateMachine()
33      {
34          StateMachine stateMachine = null;
35          CompositeState compositeState = metaObject.getContainer();
36  
37          if (compositeState != null)
38          {
39              while (compositeState != null)
40              {
41                  stateMachine = compositeState.getStateMachine();
42                  compositeState = compositeState.getContainer();
43              }
44          }
45  
46          return stateMachine;
47      }
48  
49      /**
50       * @see org.andromda.metafacades.uml14.ObjectFlowStateFacadeLogic#handleGetType()
51       */
52      protected Classifier handleGetType()
53      {
54          return metaObject.getType();
55      }
56  }