/
Component.java
356 lines (330 loc) · 16.6 KB
/
Component.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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
/*
* 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, 351777, 382718, 418466, 451350, 485756
* 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;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Component</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A Component represents a modular part of a system that encapsulates its contents and whose manifestation is replaceable within its environment.
* <p>From package UML::StructuredClassifiers.</p>
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.eclipse.uml2.uml.Component#isIndirectlyInstantiated <em>Is Indirectly Instantiated</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Component#getPackagedElements <em>Packaged Element</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Component#getProvideds <em>Provided</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Component#getRealizations <em>Realization</em>}</li>
* <li>{@link org.eclipse.uml2.uml.Component#getRequireds <em>Required</em>}</li>
* </ul>
*
* @see org.eclipse.uml2.uml.UMLPackage#getComponent()
* @model
* @generated
*/
public interface Component
extends org.eclipse.uml2.uml.Class {
/**
* Returns the value of the '<em><b>Is Indirectly Instantiated</b></em>' attribute.
* The default value is <code>"true"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If true, the Component is defined at design-time, but at run-time (or execution-time) an object specified by the Component does not exist, that is, the Component is instantiated indirectly, through the instantiation of its realizing Classifiers or parts.
* <p>From package UML::StructuredClassifiers.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Is Indirectly Instantiated</em>' attribute.
* @see #setIsIndirectlyInstantiated(boolean)
* @see org.eclipse.uml2.uml.UMLPackage#getComponent_IsIndirectlyInstantiated()
* @model default="true" dataType="org.eclipse.uml2.types.Boolean" required="true" ordered="false"
* @generated
*/
boolean isIndirectlyInstantiated();
/**
* Sets the value of the '{@link org.eclipse.uml2.uml.Component#isIndirectlyInstantiated <em>Is Indirectly Instantiated</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Indirectly Instantiated</em>' attribute.
* @see #isIndirectlyInstantiated()
* @generated
*/
void setIsIndirectlyInstantiated(boolean value);
/**
* Returns the value of the '<em><b>Required</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Interface}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The Interfaces that the Component requires from other Components in its environment in order to be able to offer its full set of provided functionality. These Interfaces may be used by the Component or any of its realizingClassifiers, or they may be the Interfaces that are required by its public Ports.
* <p>From package UML::StructuredClassifiers.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Required</em>' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getComponent_Required()
* @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
* @generated
*/
EList<Interface> getRequireds();
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Interface} with the specified '<em><b>Name</b></em>' from the '<em><b>Required</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.Interface} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.Interface} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getRequireds()
* @generated
*/
Interface getRequired(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Interface} with the specified '<em><b>Name</b></em>' from the '<em><b>Required</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.Interface} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @return The first {@link org.eclipse.uml2.uml.Interface} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getRequireds()
* @generated
*/
Interface getRequired(String name, boolean ignoreCase);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A Component cannot nest Classifiers.
* nestedClassifier->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 validateNoNestedClassifiers(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A Component nested in a Class cannot have any packaged elements.
* nestingClass <> null implies packagedElement->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 validateNoPackagedElements(DiagnosticChain diagnostics,
Map<Object, Object> context);
/**
* Returns the value of the '<em><b>Provided</b></em>' reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.Interface}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The Interfaces that the Component exposes to its environment. These Interfaces may be Realized by the Component or any of its realizingClassifiers, or they may be the Interfaces that are provided by its public Ports.
* <p>From package UML::StructuredClassifiers.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Provided</em>' reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getComponent_Provided()
* @model transient="true" changeable="false" volatile="true" derived="true" ordered="false"
* @generated
*/
EList<Interface> getProvideds();
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Interface} with the specified '<em><b>Name</b></em>' from the '<em><b>Provided</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.Interface} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.Interface} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getProvideds()
* @generated
*/
Interface getProvided(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.Interface} with the specified '<em><b>Name</b></em>' from the '<em><b>Provided</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.Interface} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @return The first {@link org.eclipse.uml2.uml.Interface} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getProvideds()
* @generated
*/
Interface getProvided(String name, boolean ignoreCase);
/**
* Returns the value of the '<em><b>Packaged Element</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.PackageableElement}.
* <p>
* This feature subsets the following features:
* </p>
* <ul>
* <li>'{@link org.eclipse.uml2.uml.Namespace#getOwnedMembers() <em>Owned Member</em>}'</li>
* </ul>
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The set of PackageableElements that a Component owns. In the namespace of a Component, all model elements that are involved in or related to its definition may be owned or imported explicitly. These may include e.g., Classes, Interfaces, Components, Packages, UseCases, Dependencies (e.g., mappings), and Artifacts.
* <p>From package UML::StructuredClassifiers.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Packaged Element</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getComponent_PackagedElement()
* @model containment="true" resolveProxies="true" ordered="false"
* @generated
*/
EList<PackageableElement> getPackagedElements();
/**
* Creates a new {@link org.eclipse.uml2.uml.PackageableElement}, with the specified '<em><b>Name</b></em>', and appends it to the '<em><b>Packaged Element</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.PackageableElement}, or <code>null</code>.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.PackageableElement} to create.
* @return The new {@link org.eclipse.uml2.uml.PackageableElement}.
* @see #getPackagedElements()
* @generated
*/
PackageableElement createPackagedElement(String name, EClass eClass);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.PackageableElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Packaged Element</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.PackageableElement} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.PackageableElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getPackagedElements()
* @generated
*/
PackageableElement getPackagedElement(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.PackageableElement} with the specified '<em><b>Name</b></em>' from the '<em><b>Packaged Element</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.PackageableElement} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.PackageableElement} to retrieve, or <code>null</code>.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.PackageableElement} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.PackageableElement} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getPackagedElements()
* @generated
*/
PackageableElement getPackagedElement(String name, boolean ignoreCase,
EClass eClass, boolean createOnDemand);
/**
* Returns the value of the '<em><b>Realization</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.uml2.uml.ComponentRealization}.
* It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.ComponentRealization#getAbstraction <em>Abstraction</em>}'.
* <p>
* This feature subsets the following features:
* </p>
* <ul>
* <li>'{@link org.eclipse.uml2.uml.Element#getOwnedElements() <em>Owned Element</em>}'</li>
* </ul>
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The set of Realizations owned by the Component. Realizations reference the Classifiers of which the Component is an abstraction; i.e., that realize its behavior.
* <p>From package UML::StructuredClassifiers.</p>
* <!-- end-model-doc -->
* @return the value of the '<em>Realization</em>' containment reference list.
* @see org.eclipse.uml2.uml.UMLPackage#getComponent_Realization()
* @see org.eclipse.uml2.uml.ComponentRealization#getAbstraction
* @model opposite="abstraction" containment="true" resolveProxies="true" ordered="false"
* @generated
*/
EList<ComponentRealization> getRealizations();
/**
* Creates a new {@link org.eclipse.uml2.uml.ComponentRealization}, with the specified '<em><b>Name</b></em>', and appends it to the '<em><b>Realization</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name The '<em><b>Name</b></em>' for the new {@link org.eclipse.uml2.uml.ComponentRealization}, or <code>null</code>.
* @return The new {@link org.eclipse.uml2.uml.ComponentRealization}.
* @see #getRealizations()
* @generated
*/
ComponentRealization createRealization(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.ComponentRealization} with the specified '<em><b>Name</b></em>' from the '<em><b>Realization</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.ComponentRealization} to retrieve, or <code>null</code>.
* @return The first {@link org.eclipse.uml2.uml.ComponentRealization} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getRealizations()
* @generated
*/
ComponentRealization getRealization(String name);
/**
* Retrieves the first {@link org.eclipse.uml2.uml.ComponentRealization} with the specified '<em><b>Name</b></em>' from the '<em><b>Realization</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.ComponentRealization} to retrieve, or <code>null</code>.
* @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons.
* @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.ComponentRealization} on demand if not found.
* @return The first {@link org.eclipse.uml2.uml.ComponentRealization} with the specified '<em><b>Name</b></em>', or <code>null</code>.
* @see #getRealizations()
* @generated
*/
ComponentRealization getRealization(String name, boolean ignoreCase,
boolean createOnDemand);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Creates a(n) (abstract) class with the specified name as a packaged element of this component.
* @param name The name for the new class, or null.
* @param isAbstract Whether the new class should be abstract.
* <!-- end-model-doc -->
* @model required="true" ordered="false" nameDataType="org.eclipse.uml2.types.String" nameRequired="true" nameOrdered="false" isAbstractDataType="org.eclipse.uml2.types.Boolean" isAbstractRequired="true" isAbstractOrdered="false"
* @generated
*/
org.eclipse.uml2.uml.Class createOwnedClass(String name,
boolean isAbstract);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Creates a enumeration with the specified name as a packaged element of this component.
* @param name The name for the new enumeration, or null.
* <!-- end-model-doc -->
* @model required="true" ordered="false" nameDataType="org.eclipse.uml2.types.String" nameRequired="true" nameOrdered="false"
* @generated
*/
Enumeration createOwnedEnumeration(String name);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Creates a primitive type with the specified name as a packaged element of this component.
* @param name The name for the new primitive type, or null.
* <!-- end-model-doc -->
* @model required="true" ordered="false" nameDataType="org.eclipse.uml2.types.String" nameRequired="true" nameOrdered="false"
* @generated
*/
PrimitiveType createOwnedPrimitiveType(String name);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Creates an interface with the specified name as a packaged element of this component.
* @param name The name for the new interface, or null.
* <!-- end-model-doc -->
* @model required="true" ordered="false" nameDataType="org.eclipse.uml2.types.String" nameRequired="true" nameOrdered="false"
* @generated
*/
Interface createOwnedInterface(String name);
} // Component