/
OpaqueExpression.java
272 lines (251 loc) · 9.39 KB
/
OpaqueExpression.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
/*
* Copyright (c) 2005, 2018 IBM Corporation, CEA, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* IBM - initial API and implementation
* Kenn Hussey (CEA) - 327039, 351774, 418466, 451350, 511674
* Christian W. Damus (CEA) - 251963
* Kenn Hussey - 535301
*
*/
package org.eclipse.uml2.uml;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Opaque Expression</b></em>'.
* @extends BodyOwner
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* An OpaqueExpression is a ValueSpecification that specifies the computation of a collection of values either in terms of a UML Behavior or based on a textual statement in a language other than UML
* <p>From package UML::Values.</p>
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.eclipse.uml2.uml.OpaqueExpression#getBehavior <em>Behavior</em>}</li>
* <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>
* </ul>
*
* @see org.eclipse.uml2.uml.UMLPackage#getOpaqueExpression()
* @model
* @generated
*/
public interface OpaqueExpression
extends ValueSpecification, BodyOwner {
/**
* 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 -->
* A textual definition of the behavior of the OpaqueExpression, possibly in multiple languages.
* <p>From package UML::Values.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Body</em>' attribute list.
* @see #isSetBodies()
* @see #unsetBodies()
* @see org.eclipse.uml2.uml.UMLPackage#getOpaqueExpression_Body()
* @model unique="false" unsettable="true" dataType="org.eclipse.uml2.types.String"
* extendedMetaData="kind='element'"
* @generated
*/
EList<String> getBodies();
/**
* Unsets the value of the '{@link org.eclipse.uml2.uml.OpaqueExpression#getBodies <em>Body</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isSetBodies()
* @see #getBodies()
* @generated
*/
void unsetBodies();
/**
* Returns whether the value of the '{@link org.eclipse.uml2.uml.OpaqueExpression#getBodies <em>Body</em>}' attribute list is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Body</em>' attribute list is set.
* @see #unsetBodies()
* @see #getBodies()
* @generated
*/
boolean isSetBodies();
/**
* 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 used to express the textual bodies of the OpaqueExpression. Languages are matched to body Strings by order. The interpretation of the body depends on the languages. If the languages are unspecified, they may be implicit from the expression body or the context.
* <p>From package UML::Values.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Language</em>' attribute list.
* @see #isSetLanguages()
* @see #unsetLanguages()
* @see org.eclipse.uml2.uml.UMLPackage#getOpaqueExpression_Language()
* @model unsettable="true" dataType="org.eclipse.uml2.types.String"
* @generated
*/
EList<String> getLanguages();
/**
* Unsets the value of the '{@link org.eclipse.uml2.uml.OpaqueExpression#getLanguages <em>Language</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isSetLanguages()
* @see #getLanguages()
* @generated
*/
void unsetLanguages();
/**
* Returns whether the value of the '{@link org.eclipse.uml2.uml.OpaqueExpression#getLanguages <em>Language</em>}' attribute list is set.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return whether the value of the '<em>Language</em>' attribute list is set.
* @see #unsetLanguages()
* @see #getLanguages()
* @generated
*/
boolean isSetLanguages();
/**
* Returns the value of the '<em><b>Result</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If an OpaqueExpression is specified using a UML Behavior, then this refers to the single required return Parameter of that Behavior. When the Behavior completes execution, the values on this Parameter give the result of evaluating the OpaqueExpression.
* <p>From package UML::Values.</p>
* <!-- 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 OpaqueExpression as a UML Behavior.
* <p>From package UML::Values.</p>
* <!-- 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())
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateLanguageBodySize(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The behavior may only have return result parameters.
* behavior <> null implies behavior.ownedParameter->select(direction<>ParameterDirectionKind::return)->isEmpty()
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateOnlyReturnResultParameters(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The behavior must have exactly one return result parameter.
* behavior <> null implies
* behavior.ownedParameter->select(direction=ParameterDirectionKind::return)->size() = 1
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean validateOneReturnResultParameter(DiagnosticChain diagnostics,
Map<Object, Object> 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()
* result = (0)
* <p>From package UML::Values.</p>
* <!-- end-model-doc -->
* @model dataType="org.eclipse.uml2.types.Integer" required="true" ordered="false"
* @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)
* <p>From package UML::Values.</p>
* <!-- end-model-doc -->
* @model kind="operation" dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false"
* @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)
* <p>From package UML::Values.</p>
* <!-- end-model-doc -->
* @model kind="operation" dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false"
* @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)
* <p>From package UML::Values.</p>
* <!-- end-model-doc -->
* @model kind="operation" dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false"
* @generated
*/
boolean isNonNegative();
} // OpaqueExpression