Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/OpaqueExpression.java')
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/OpaqueExpression.java236
1 files changed, 236 insertions, 0 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/OpaqueExpression.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/OpaqueExpression.java
new file mode 100644
index 00000000..7a27d2e8
--- /dev/null
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/OpaqueExpression.java
@@ -0,0 +1,236 @@
+/*
+ * 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: OpaqueExpression.java,v 1.1 2005/11/14 22:25:56 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>Opaque Expression</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * An opaque expression contains language-specific text strings used to describe a value or values, and an optional specification of the languages.
+ * An expression contains language-specific text strings used to describe a value or values, and an optional specification of the languages.
+ *
+ * One predefined language for specifying expressions is OCL. Natural language or programming languages may also be used.
+ *
+ *
+ * Provides a mechanism for precisely defining the behavior of an opaque expression. An opaque expression is defined by a behavior restricted to return one result.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.uml2.uml.OpaqueExpression#getBodies <em>Body</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.OpaqueExpression#getLanguages <em>Language</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.OpaqueExpression#getResult <em>Result</em>}</li>
+ * <li>{@link org.eclipse.uml2.uml.OpaqueExpression#getBehavior <em>Behavior</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.uml2.uml.UMLPackage#getOpaqueExpression()
+ * @model
+ * @generated
+ */
+public interface OpaqueExpression
+ extends ValueSpecification {
+
+ /**
+ * Returns the value of the '<em><b>Body</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The text of the expression, possibly in multiple languages.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Body</em>' attribute list.
+ * @see org.eclipse.uml2.uml.UMLPackage#getOpaqueExpression_Body()
+ * @model type="java.lang.String" required="true"
+ * extendedMetaData="kind='element'"
+ * @generated
+ */
+ List getBodies();
+
+ /**
+ * Returns the value of the '<em><b>Language</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Specifies the languages in which the expression is stated. The interpretation of the expression body depends on the language. If languages are unspecified, it might be implicit from the expression body or the context. Languages are matched to body strings by order.
+ * Specifies the languages in which the expression is stated. The interpretation of the expression body depends on the languages. If the languages are unspecified, they might be implicit from the expression body or the context. Languages are matched to body strings by order.
+ *
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Language</em>' attribute list.
+ * @see org.eclipse.uml2.uml.UMLPackage#getOpaqueExpression_Language()
+ * @model type="java.lang.String"
+ * @generated
+ */
+ List getLanguages();
+
+ /**
+ * Returns the value of the '<em><b>Result</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Restricts an opaque expression to return exactly one return result. When the invocation of the opaque expression completes, a single set of values is returned to its owner. This association is derived from the single return result parameter of the associated behavior.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Result</em>' reference.
+ * @see org.eclipse.uml2.uml.UMLPackage#getOpaqueExpression_Result()
+ * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ Parameter getResult();
+
+ /**
+ * Returns the value of the '<em><b>Behavior</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Specifies the behavior of the opaque expression.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Behavior</em>' reference.
+ * @see #setBehavior(Behavior)
+ * @see org.eclipse.uml2.uml.UMLPackage#getOpaqueExpression_Behavior()
+ * @model ordered="false"
+ * @generated
+ */
+ Behavior getBehavior();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.uml2.uml.OpaqueExpression#getBehavior <em>Behavior</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Behavior</em>' reference.
+ * @see #getBehavior()
+ * @generated
+ */
+ void setBehavior(Behavior value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * If the language attribute is not empty, then the size of the body and language arrays must be the same.
+ * language->notEmpty() implies (body->size() = language->size())
+ * <!-- end-model-doc -->
+ * @model
+ * @generated
+ */
+ boolean validateLanguageBodySize(DiagnosticChain diagnostics, Map context);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * If there is only one body then the size of the language is exactly 0 (corresponding to the default language).
+ * The there is only one body then the size of the language is exactly 0 (corresponding to the default language).
+ * language->isEmpty() implies (body->size() = 1)
+ * <!-- end-model-doc -->
+ * @model
+ * @generated
+ */
+ boolean validateOneBodyDefaultLanguage(DiagnosticChain diagnostics,
+ Map context);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The behavior may only have return result parameters.
+ * self.behavior.notEmpty() implies
+ *
+ * self.behavior.ownedParameters->select(p | p.direction<>#return)->isEmpty()
+ * <!-- end-model-doc -->
+ * @model
+ * @generated
+ */
+ boolean validateOnlyReturnResultParameters(DiagnosticChain diagnostics,
+ Map context);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The behavior must have exactly one return result parameter.
+ * self.behavior.notEmpty() implies
+ *
+ * self.behavior.ownedParameter->select(p | p.direction=#return)->size() = 1
+ * <!-- end-model-doc -->
+ * @model
+ * @generated
+ */
+ boolean validateOneReturnResultParameter(DiagnosticChain diagnostics,
+ Map context);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The query value() gives an integer value for an expression intended to produce one.
+ * self.isIntegral()
+ * true
+ * <!-- end-model-doc -->
+ * @model required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='spec'"
+ * @generated
+ */
+ int value();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The query isIntegral() tells whether an expression is intended to produce an integer.
+ * result = false
+ * <!-- end-model-doc -->
+ * @model kind="operation" required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='spec'"
+ * @generated
+ */
+ boolean isIntegral();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The query isPositive() tells whether an integer expression has a positive value.
+ * self.isIntegral()
+ * result = false
+ * <!-- end-model-doc -->
+ * @model kind="operation" required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='spec'"
+ * @generated
+ */
+ boolean isPositive();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The query isNonNegative() tells whether an integer expression has a non-negative value.
+ * self.isIntegral()
+ * result = false
+ * <!-- end-model-doc -->
+ * @model kind="operation" required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='spec'"
+ * @generated
+ */
+ boolean isNonNegative();
+
+} // OpaqueExpression

Back to the top