Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/Behavior.java')
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/Behavior.java291
1 files changed, 291 insertions, 0 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/Behavior.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/Behavior.java
new file mode 100644
index 00000000..00f039d3
--- /dev/null
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/Behavior.java
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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:
+ * IBM - initial API and implementation
+ *
+ * $Id: Behavior.java,v 1.1 2005/11/14 22:25:57 khussey Exp $
+ */
+package org.eclipse.uml2.uml;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.DiagnosticChain;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Behavior</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * Behavior is a specification of how its context classifier changes state over time. This specification may be either a definition of possible behavior execution or emergent behavior, or a selective illustration of an interesting subset of possible executions. The latter form is typically used for capturing examples, such as a trace of a particular execution.
+ *
+ *
+ *
+ * A classifier behavior is always a definition of behavior and not an illustration. It describes the sequence of state changes an instance of a classifier may undergo in the course of its lifetime. Its precise semantics depends on the kind of classifier. For example, the classifier behavior of a collaboration represents emergent behavior of all the parts, whereas the classifier behavior of a class is just the behavior of instances of the class separated from the behaviors of any of its parts.
+ *
+ * When a behavior is associated as the method of a behavioral feature, it defines the implementation of that feature; i.e., the computation that generates the effects of the behavioral feature.
+ *
+ *
+ *
+ * As a classifier, a behavior can be specialized. Instantiating a behavior is referred to as "invoking" the behavior, an instantiated behavior is also called a behavior "execution." A behavior may be invoked directly or its invocation may be the result of invoking the behavioral feature that specifies this behavior. A behavior can also be instantiated as an object in virtue of it being a class. The specification of a behavior can take a number of forms, as described in the subclasses of Behavior. Behavior is an abstract metaclass factoring out the commonalities of these different specification mechanisms.
+ *
+ *
+ *
+ * When a behavior is invoked, its execution receives a set of input values that are used to affect the course of execution and as a result of its execution it produces a set of output values which are returned, as specified by its parameters. The observable effects of a behavior execution may include changes of values of various objects involved in the execution, the creation and destruction of objects, generation of communications between objects, as well as an explicit set of output values.
+ *
+ *
+ * The concept of Behavior is extended to own ParameterSets.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.uml2.uml.Behavior#isReentrant <em>Is Reentrant</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.Behavior#getRedefinedBehaviors <em>Redefined Behavior</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.Behavior#getOwnedParameters <em>Owned Parameter</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.Behavior#getContext <em>Context</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.Behavior#getOwnedParameterSets <em>Owned Parameter Set</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.Behavior#getSpecification <em>Specification</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.uml2.uml.UMLPackage#getBehavior()
+ * @model
+ * @generated
+ */
+public interface Behavior
+ extends org.eclipse.uml2.uml.Class {
+
+ /**
+ * Returns the value of the '<em><b>Is Reentrant</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Tells whether the behavior can be invoked while it is still executing from a previous invocation.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Is Reentrant</em>' attribute.
+ * @see #setIsReentrant(boolean)
+ * @see org.eclipse.uml2.uml.UMLPackage#getBehavior_IsReentrant()
+ * @model required="true" ordered="false"
+ * @generated
+ */
+ boolean isReentrant();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.uml2.uml.Behavior#isReentrant <em>Is Reentrant</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Is Reentrant</em>' attribute.
+ * @see #isReentrant()
+ * @generated
+ */
+ void setIsReentrant(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Redefined Behavior</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.uml2.uml.Behavior}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * References a behavior that this behavior redefines. A subtype of Behavior may redefine any other subtype of Behavior. If the behavior implements a behavioral feature, it replaces the redefined behavior. If the behavior is a classifier behavior, it extends the redefined behavior.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Redefined Behavior</em>' reference list.
+ * @see org.eclipse.uml2.uml.UMLPackage#getBehavior_RedefinedBehavior()
+ * @model type="org.eclipse.uml2.uml.Behavior" ordered="false"
+ * @generated
+ */
+ List getRedefinedBehaviors();
+
+ /**
+ * Retrieves the {@link org.eclipse.uml2.uml.Behavior} with the specified '<em><b>Name</b></em>' from the '<em><b>Redefined Behavior</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Behavior} to retrieve.
+ * @return The {@link org.eclipse.uml2.uml.Behavior} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getRedefinedBehaviors()
+ * @generated
+ */
+ Behavior getRedefinedBehavior(String name);
+
+ /**
+ * Returns the value of the '<em><b>Owned Parameter</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.uml2.uml.Parameter}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * References a list of parameters to the behavior which describes the order and type of arguments that can be given when the behavior is invoked and of the values which will be returned when the behavior completes its execution.
+ *
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Owned Parameter</em>' containment reference list.
+ * @see org.eclipse.uml2.uml.UMLPackage#getBehavior_OwnedParameter()
+ * @model type="org.eclipse.uml2.uml.Parameter" containment="true" resolveProxies="false"
+ * @generated
+ */
+ List getOwnedParameters();
+
+ /**
+ * Creates a {@link org.eclipse.uml2.uml.Parameter} and appends it to the '<em><b>Owned Parameter</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return The new {@link org.eclipse.uml2.uml.Parameter}.
+ * @see #getOwnedParameters()
+ * @generated
+ */
+ Parameter createOwnedParameter();
+
+ /**
+ * Retrieves the {@link org.eclipse.uml2.uml.Parameter} with the specified '<em><b>Name</b></em>' from the '<em><b>Owned Parameter</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.Parameter} to retrieve.
+ * @return The {@link org.eclipse.uml2.uml.Parameter} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getOwnedParameters()
+ * @generated
+ */
+ Parameter getOwnedParameter(String name);
+
+ /**
+ * Returns the value of the '<em><b>Context</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The classifier that is the context for the execution of the behavior. If the behavior is owned by a BehavioredClassifier, that classifier is the context. Otherwise, the context is the first BehavioredClassifier reached by following the chain of owner relationships. For example, following this algorithm, the owner of an entry action in a state machine is the classifier that owns the state machine. The features of the context classifier as well as the elements visible to the context classifier are visible to the behavior.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Context</em>' reference.
+ * @see #setContext(BehavioredClassifier)
+ * @see org.eclipse.uml2.uml.UMLPackage#getBehavior_Context()
+ * @model transient="true" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ BehavioredClassifier getContext();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.uml2.uml.Behavior#getContext <em>Context</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Context</em>' reference.
+ * @see #getContext()
+ * @generated
+ */
+ void setContext(BehavioredClassifier value);
+
+ /**
+ * Returns the value of the '<em><b>Owned Parameter Set</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.uml2.uml.ParameterSet}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The ParameterSets owned by this Behavior.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Owned Parameter Set</em>' containment reference list.
+ * @see org.eclipse.uml2.uml.UMLPackage#getBehavior_OwnedParameterSet()
+ * @model type="org.eclipse.uml2.uml.ParameterSet" containment="true" resolveProxies="false" ordered="false"
+ * @generated
+ */
+ List getOwnedParameterSets();
+
+ /**
+ * Creates a {@link org.eclipse.uml2.uml.ParameterSet} and appends it to the '<em><b>Owned Parameter Set</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return The new {@link org.eclipse.uml2.uml.ParameterSet}.
+ * @see #getOwnedParameterSets()
+ * @generated
+ */
+ ParameterSet createOwnedParameterSet();
+
+ /**
+ * Retrieves the {@link org.eclipse.uml2.uml.ParameterSet} with the specified '<em><b>Name</b></em>' from the '<em><b>Owned Parameter Set</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param name The '<em><b>Name</b></em>' of the {@link org.eclipse.uml2.uml.ParameterSet} to retrieve.
+ * @return The {@link org.eclipse.uml2.uml.ParameterSet} with the specified '<em><b>Name</b></em>', or <code>null</code>.
+ * @see #getOwnedParameterSets()
+ * @generated
+ */
+ ParameterSet getOwnedParameterSet(String name);
+
+ /**
+ * Returns the value of the '<em><b>Specification</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.BehavioralFeature#getMethods <em>Method</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Designates a behavioral feature that the behavior implements. The behavioral feature must be owned by the classifier that owns the behavior or be inherited by it. The parameters of the behavioral feature and the implementing behavior must match. If a behavior does not have a specification, it is directly associated with a classifier (i.e., it is the behavior of the classifier as a whole).
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Specification</em>' reference.
+ * @see #setSpecification(BehavioralFeature)
+ * @see org.eclipse.uml2.uml.UMLPackage#getBehavior_Specification()
+ * @see org.eclipse.uml2.uml.BehavioralFeature#getMethods
+ * @model opposite="method" ordered="false"
+ * @generated
+ */
+ BehavioralFeature getSpecification();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.uml2.uml.Behavior#getSpecification <em>Specification</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Specification</em>' reference.
+ * @see #getSpecification()
+ * @generated
+ */
+ void setSpecification(BehavioralFeature value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The parameters of the behavior must match the parameters of the implemented behavioral feature.
+ * true
+ * <!-- end-model-doc -->
+ * @model
+ * @generated
+ */
+ boolean validateParameters(DiagnosticChain diagnostics, Map context);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The implemented behavioral feature must be a feature (possibly inherited) of the context classifier of the behavior.
+ * true
+ * <!-- end-model-doc -->
+ * @model
+ * @generated
+ */
+ boolean validateFeatureOfContextClassifier(DiagnosticChain diagnostics,
+ Map context);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * If the implemented behavioral feature has been redefined in the ancestors of the owner of the behavior, then the behavior must realize the latest redefining behavioral feature.
+ * true
+ * <!-- end-model-doc -->
+ * @model
+ * @generated
+ */
+ boolean validateMustRealize(DiagnosticChain diagnostics, Map context);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * There may be at most one behavior for a given pairing of classifier (as owner of the behavior) and behavioral feature (as specification of the behavior).
+ * true
+ * <!-- end-model-doc -->
+ * @model
+ * @generated
+ */
+ boolean validateMostOneBehaviour(DiagnosticChain diagnostics, Map context);
+
+} // Behavior

Back to the top