Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java')
-rw-r--r--sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java
new file mode 100644
index 00000000000..6b362fb11cc
--- /dev/null
+++ b/sandbox/Moka/org.eclipse.papyrus.moka.fuml/generated/org/eclipse/papyrus/moka/fuml/Semantics/Actions/CompleteActions/StartClassifierBehaviorActionActivation.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.Semantics.Actions.CompleteActions;
+
+import java.util.ArrayList;
+
+import org.eclipse.papyrus.moka.fuml.Semantics.Actions.BasicActions.ActionActivation;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Reference;
+import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.Value;
+import org.eclipse.papyrus.moka.fuml.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.StartClassifierBehaviorAction;
+
+public class StartClassifierBehaviorActionActivation extends ActionActivation {
+
+ public void doAction() {
+ // Get the value on the object input pin. If it is not a reference, then
+ // do nothing.
+ // Start the classifier behavior of the referent object for the
+ // classifier given as the type of the object input pin.
+ // If the object input pin has no type, then start the classifier
+ // behaviors of all types of the referent object. [The required behavior
+ // in this case is not clear from the spec.]
+ StartClassifierBehaviorAction action = (StartClassifierBehaviorAction)(this.node);
+ Value object = this.takeTokens(action.getObject()).get(0);
+ if(object instanceof Reference) {
+ ((Reference)object).startBehavior((Class)(action.getObject().getType()), new ArrayList<ParameterValue>());
+ }
+ }
+}

Back to the top