View Javadoc
1   package org.andromda.metafacades.emf.uml22;
2   
3   import java.lang.reflect.InvocationTargetException;
4   import java.util.Map;
5   import org.eclipse.emf.common.notify.Adapter;
6   import org.eclipse.emf.common.notify.Notification;
7   import org.eclipse.emf.common.util.DiagnosticChain;
8   import org.eclipse.emf.common.util.EList;
9   import org.eclipse.emf.common.util.TreeIterator;
10  import org.eclipse.emf.ecore.EAnnotation;
11  import org.eclipse.emf.ecore.EClass;
12  import org.eclipse.emf.ecore.EObject;
13  import org.eclipse.emf.ecore.EOperation;
14  import org.eclipse.emf.ecore.EReference;
15  import org.eclipse.emf.ecore.EStructuralFeature;
16  import org.eclipse.emf.ecore.resource.Resource;
17  import org.eclipse.uml2.uml.Classifier;
18  import org.eclipse.uml2.uml.Comment;
19  import org.eclipse.uml2.uml.Dependency;
20  import org.eclipse.uml2.uml.Deployment;
21  import org.eclipse.uml2.uml.DirectedRelationship;
22  import org.eclipse.uml2.uml.Element;
23  import org.eclipse.uml2.uml.InstanceSpecification;
24  import org.eclipse.uml2.uml.Model;
25  import org.eclipse.uml2.uml.NamedElement;
26  import org.eclipse.uml2.uml.Namespace;
27  import org.eclipse.uml2.uml.Package;
28  import org.eclipse.uml2.uml.PackageableElement;
29  import org.eclipse.uml2.uml.ParameterableElement;
30  import org.eclipse.uml2.uml.Relationship;
31  import org.eclipse.uml2.uml.Slot;
32  import org.eclipse.uml2.uml.Stereotype;
33  import org.eclipse.uml2.uml.StringExpression;
34  import org.eclipse.uml2.uml.TemplateParameter;
35  import org.eclipse.uml2.uml.Type;
36  import org.eclipse.uml2.uml.Usage;
37  import org.eclipse.uml2.uml.ValueSpecification;
38  import org.eclipse.uml2.uml.VisibilityKind;
39  
40  /**
41   *
42   */
43  public class ObjectInstanceImpl implements ObjectInstance
44  {
45      /**
46       *
47       */
48      final InstanceSpecification instanceSpecification;
49  
50      /**
51       * @param instanceSpecification
52       */
53      ObjectInstanceImpl(final InstanceSpecification instanceSpecification)
54      {
55          this.instanceSpecification = instanceSpecification;
56      }
57  
58      /**
59       * @see Object#equals(Object)
60       */
61      @Override
62      public boolean equals(final Object object)
63      {
64          if (object instanceof ObjectInstanceImpl)
65          {
66              return this.instanceSpecification.equals(((ObjectInstanceImpl)object).instanceSpecification);
67          }
68          /*if (object instanceof LinkInstanceImpl)
69          {
70              return this.instanceSpecification.equals(((LinkInstanceImpl)object).instanceSpecification);
71          }*/
72          return this.instanceSpecification.equals(object);
73      }
74  
75      /**
76       * @see Object#hashCode()
77       */
78      @Override
79      public int hashCode()
80      {
81          return this.instanceSpecification.hashCode();
82      }
83  
84      /**
85       * @see Object#toString()
86       */
87      @Override
88      public String toString()
89      {
90          return this.getClass().getName() + '[' + this.instanceSpecification.toString() + ']';
91      }
92  
93      /**
94       * @see org.eclipse.uml2.uml.DeploymentTarget#getDeployments()
95       */
96      public EList<Deployment> getDeployments()
97      {
98          return this.instanceSpecification.getDeployments();
99      }
100 
101     /**
102      * @see org.eclipse.uml2.uml.DeploymentTarget#getDeployment(String, boolean, boolean)
103      */
104     public Deployment getDeployment(final String string, final boolean ignoreCase, final boolean createOnDemand)
105     {
106         return this.instanceSpecification.getDeployment(string, ignoreCase, createOnDemand);
107     }
108 
109     /**
110      * @see org.eclipse.uml2.uml.DeploymentTarget#getDeployment(String)
111      */
112     public Deployment getDeployment(final String string)
113     {
114         return this.instanceSpecification.getDeployment(string);
115     }
116 
117     /*public Deployment createDeployment(EClass eClass)
118     {
119         return this.instanceSpecification.createDeployment(eClass);
120     }
121 
122     public Deployment createDeployment()
123     {
124         return this.instanceSpecification.createDeployment();
125     }*/
126 
127     /**
128      * @see org.eclipse.uml2.uml.DeploymentTarget#createDeployment(String)
129      */
130     public Deployment createDeployment(final String name)
131     {
132         return this.instanceSpecification.createDeployment(name);
133     }
134 
135     /**
136      * @see org.eclipse.uml2.uml.DeploymentTarget#getDeployedElements()
137      */
138     public EList<PackageableElement> getDeployedElements()
139     {
140         return this.instanceSpecification.getDeployedElements();
141     }
142 
143     /**
144      * @see org.eclipse.uml2.uml.DeploymentTarget#getDeployedElement(String)
145      */
146     public PackageableElement getDeployedElement(final String string)
147     {
148         return this.instanceSpecification.getDeployedElement(string);
149     }
150 
151     /**
152      * @see org.eclipse.uml2.uml.DeploymentTarget#getDeployedElement(String, boolean, org.eclipse.emf.ecore.EClass)
153      */
154     public PackageableElement getDeployedElement(final String string, final boolean bool, final EClass eClass)
155     {
156         return this.instanceSpecification.getDeployedElement(string, bool, eClass);
157     }
158 
159     /**
160      * @see org.eclipse.uml2.uml.InstanceSpecification#getSlots()
161      */
162     public EList<Slot> getSlots()
163     {
164         return this.instanceSpecification.getSlots();
165     }
166 
167     /**
168      * @param eClass
169      * @return instanceSpecification.createSlot()
170      */
171     public Slot createSlot(final EClass eClass)
172     {
173         return this.instanceSpecification.createSlot();
174     }
175 
176     /**
177      * @see org.eclipse.uml2.uml.InstanceSpecification#createSlot()
178      */
179     public Slot createSlot()
180     {
181         return this.instanceSpecification.createSlot();
182     }
183 
184     /**
185      * @see org.eclipse.uml2.uml.InstanceSpecification#getClassifiers()
186      */
187     public EList<Classifier> getClassifiers()
188     {
189         return this.instanceSpecification.getClassifiers();
190     }
191 
192     /**
193      * @see org.eclipse.uml2.uml.InstanceSpecification#getClassifier(String)
194      */
195     public Classifier getClassifier(final String string)
196     {
197         return this.instanceSpecification.getClassifier(string);
198     }
199 
200     /**
201      * @see org.eclipse.uml2.uml.InstanceSpecification#getClassifier(String, boolean, org.eclipse.emf.ecore.EClass)
202      */
203     public Classifier getClassifier(final String string, final boolean ignoreCase, final EClass eClass)
204     {
205         return this.instanceSpecification.getClassifier(string, ignoreCase, eClass);
206     }
207 
208     /**
209      * @see org.eclipse.uml2.uml.InstanceSpecification#getSpecification()
210      */
211     public ValueSpecification getSpecification()
212     {
213         return this.instanceSpecification.getSpecification();
214     }
215 
216     /**
217      * @see org.eclipse.uml2.uml.InstanceSpecification#setSpecification(org.eclipse.uml2.uml.ValueSpecification)
218      */
219     public void setSpecification(final ValueSpecification valueSpecification)
220     {
221         this.instanceSpecification.setSpecification(valueSpecification);
222     }
223 
224     /**
225      * @param eClass
226      * @return instanceSpecification.createSpecification(null, null, eClass)
227      */
228     public ValueSpecification createSpecification(final EClass eClass)
229     {
230         return this.instanceSpecification.createSpecification(null, null, eClass);
231     }
232 
233     /*public boolean validateSlotsAreDefined(DiagnosticChain diagnosticChain, Map<Object, Object> map)
234     {
235         return this.instanceSpecification.validateSlotsAreDefined(diagnosticChain, map);
236     }
237 
238     public boolean validateNoDuplicateSlots(DiagnosticChain diagnosticChain, Map<Object, Object> map)
239     {
240         return this.instanceSpecification.validateNoDuplicateSlots(diagnosticChain, map);
241     }*/
242 
243     /**
244      * @see org.eclipse.uml2.uml.NamedElement#getClientDependencies()
245      */
246     public EList<Dependency> getClientDependencies()
247     {
248         return this.instanceSpecification.getClientDependencies();
249     }
250 
251     /**
252      * @see org.eclipse.emf.ecore.EObject#eGet(org.eclipse.emf.ecore.EStructuralFeature, boolean)
253      */
254     public Object eGet(final EStructuralFeature eStructuralFeature, final boolean resolve)
255     {
256         return this.instanceSpecification.eGet(eStructuralFeature, resolve);
257     }
258 
259     /**
260      * @see org.eclipse.emf.ecore.EObject#eSet(org.eclipse.emf.ecore.EStructuralFeature, Object)
261      */
262     public void eSet(final EStructuralFeature eStructuralFeature, final Object object)
263     {
264         this.instanceSpecification.eSet(eStructuralFeature, object);
265     }
266 
267     /**
268      * @see org.eclipse.emf.ecore.EObject#eUnset(org.eclipse.emf.ecore.EStructuralFeature)
269      */
270     public void eUnset(final EStructuralFeature eStructuralFeature)
271     {
272         this.instanceSpecification.eUnset(eStructuralFeature);
273     }
274 
275     /**
276      * @see org.eclipse.emf.ecore.EObject#eIsSet(org.eclipse.emf.ecore.EStructuralFeature)
277      */
278     public boolean eIsSet(final EStructuralFeature eStructuralFeature)
279     {
280         return this.instanceSpecification.eIsSet(eStructuralFeature);
281     }
282 
283     /**
284      * @see org.eclipse.uml2.uml.ParameterableElement#getTemplateParameter()
285      */
286     public TemplateParameter getTemplateParameter()
287     {
288         return this.instanceSpecification.getTemplateParameter();
289     }
290 
291     /**
292      * @see org.eclipse.uml2.uml.ParameterableElement#setTemplateParameter(org.eclipse.uml2.uml.TemplateParameter)
293      */
294     public void setTemplateParameter(final TemplateParameter templateParameter)
295     {
296         this.instanceSpecification.setTemplateParameter(templateParameter);
297     }
298 
299     /**
300      * @return instanceSpecification.getOwningTemplateParameter()
301      */
302     public TemplateParameter getOwningParameter()
303     {
304         return this.instanceSpecification.getOwningTemplateParameter();
305     }
306 
307     /**
308      * @param templateParameter
309      */
310     public void setOwningParameter(final TemplateParameter templateParameter)
311     {
312         this.instanceSpecification.setOwningTemplateParameter(templateParameter);
313     }
314 
315     /**
316      * @return instanceSpecification.getVisibility()
317      */
318     public VisibilityKind getPackageableElement_visibility()
319     {
320         return this.instanceSpecification.getVisibility();
321     }
322 
323     /**
324      * @param visibilityKind
325      */
326     public void setPackageableElement_visibility(final VisibilityKind visibilityKind)
327     {
328         this.instanceSpecification.setVisibility(visibilityKind);
329     }
330 
331     /**
332      * @see org.eclipse.uml2.uml.NamedElement#getVisibility()
333      */
334     public VisibilityKind getVisibility()
335     {
336         return this.instanceSpecification.getVisibility();
337     }
338 
339     /**
340      * @see org.eclipse.uml2.uml.NamedElement#setVisibility(org.eclipse.uml2.uml.VisibilityKind)
341      */
342     public void setVisibility(final VisibilityKind visibilityKind)
343     {
344         this.instanceSpecification.setVisibility(visibilityKind);
345     }
346 
347     /**
348      * @see org.eclipse.uml2.uml.NamedElement#getName()
349      */
350     public String getName()
351     {
352         return this.instanceSpecification.getName();
353     }
354 
355     /**
356      * @see org.eclipse.uml2.uml.NamedElement#setName(String)
357      */
358     public void setName(final String string)
359     {
360         this.instanceSpecification.setName(string);
361     }
362 
363     /**
364      * @see org.eclipse.uml2.uml.NamedElement#getQualifiedName()
365      */
366     public String getQualifiedName()
367     {
368         return this.instanceSpecification.getQualifiedName();
369     }
370 
371     /**
372      * @see org.eclipse.uml2.uml.NamedElement#getClientDependency(String)
373      */
374     public Dependency getClientDependency(final String string)
375     {
376         return this.instanceSpecification.getClientDependency(string);
377     }
378 
379     /**
380      * @see org.eclipse.uml2.uml.NamedElement#getClientDependency(String, boolean, org.eclipse.emf.ecore.EClass)
381      */
382     public Dependency getClientDependency(final String string, final boolean ignoreCase, final EClass eClass)
383     {
384         return this.instanceSpecification.getClientDependency(string, ignoreCase, eClass);
385     }
386 
387     /**
388      * @see org.eclipse.uml2.uml.NamedElement#getNameExpression()
389      */
390     public StringExpression getNameExpression()
391     {
392         return this.instanceSpecification.getNameExpression();
393     }
394 
395     /**
396      * @see org.eclipse.uml2.uml.NamedElement#setNameExpression(org.eclipse.uml2.uml.StringExpression)
397      */
398     public void setNameExpression(final StringExpression stringExpression)
399     {
400         this.instanceSpecification.setNameExpression(stringExpression);
401     }
402 
403     /*public StringExpression createNameExpression(EClass eClass)
404     {
405         return this.instanceSpecification.createNameExpression(eClass);
406     }
407 
408     public StringExpression createNameExpression()
409     {
410         return this.instanceSpecification.createNameExpression();
411     }*/
412 
413     /**
414      * @param diagnosticChain
415      * @param map
416      * @return !instanceSpecification.validateHasQualifiedName(diagnosticChain, map)
417      */
418     public boolean validateNoName(final DiagnosticChain diagnosticChain, final Map<Object, Object> map)
419     {
420         return !this.instanceSpecification.validateHasQualifiedName(diagnosticChain, map);
421     }
422 
423     /**
424      * @see org.eclipse.uml2.uml.NamedElement#validateHasNoQualifiedName(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
425      */
426     public boolean validateHasNoQualifiedName(final DiagnosticChain diagnosticChain, final Map<Object, Object> map)
427     {
428         return this.instanceSpecification.validateHasNoQualifiedName(diagnosticChain, map);
429     }
430 
431     /**
432      * @param diagnosticChain
433      * @param map
434      * @return instanceSpecification.validateHasQualifiedName(diagnosticChain, map)
435      */
436     public boolean validateQualifiedName(final DiagnosticChain diagnosticChain, final Map<Object, Object> map)
437     {
438         return this.instanceSpecification.validateHasQualifiedName(diagnosticChain, map);
439     }
440 
441     /**
442      * @see org.eclipse.uml2.uml.NamedElement#validateHasQualifiedName(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
443      */
444     public boolean validateHasQualifiedName(final DiagnosticChain diagnosticChain, final Map<Object, Object> map)
445     {
446         return this.instanceSpecification.validateHasQualifiedName(diagnosticChain, map);
447     }
448 
449     /**
450      * @see org.eclipse.uml2.uml.NamedElement#allNamespaces()
451      */
452     public EList<Namespace> allNamespaces()
453     {
454         return this.instanceSpecification.allNamespaces();
455     }
456 
457     /**
458      * @see org.eclipse.uml2.uml.NamedElement#isDistinguishableFrom(org.eclipse.uml2.uml.NamedElement, org.eclipse.uml2.uml.Namespace)
459      */
460     public boolean isDistinguishableFrom(final NamedElement namedElement, final Namespace namespace)
461     {
462         return this.instanceSpecification.isDistinguishableFrom(namedElement, namespace);
463     }
464 
465     /**
466      * @see org.eclipse.uml2.uml.NamedElement#separator()
467      */
468     public String separator()
469     {
470         return this.instanceSpecification.separator();
471     }
472 
473     /**
474      * @return instanceSpecification.getQualifiedName()
475      */
476     public String qualifiedName()
477     {
478         return this.instanceSpecification.getQualifiedName();
479     }
480 
481     /**
482      * @see org.eclipse.uml2.uml.NamedElement#validateVisibilityNeedsOwnership(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
483      */
484     public boolean validateVisibilityNeedsOwnership(final DiagnosticChain diagnosticChain, final Map<Object, Object> map)
485     {
486         return this.instanceSpecification.validateVisibilityNeedsOwnership(diagnosticChain, map);
487     }
488 
489     /**
490      * @see org.eclipse.uml2.uml.NamedElement#getNamespace()
491      */
492     public Namespace getNamespace()
493     {
494         return this.instanceSpecification.getNamespace();
495     }
496 
497     /**
498      * @see org.eclipse.uml2.uml.NamedElement#getLabel()
499      */
500     public String getLabel()
501     {
502         return this.instanceSpecification.getLabel();
503     }
504 
505     /**
506      * @see org.eclipse.uml2.uml.NamedElement#getLabel(boolean)
507      */
508     public String getLabel(final boolean localize)
509     {
510         return this.instanceSpecification.getLabel(localize);
511     }
512 
513     /**
514      * @see org.eclipse.uml2.uml.NamedElement#createDependency(org.eclipse.uml2.uml.NamedElement)
515      */
516     public Dependency createDependency(final NamedElement namedElement)
517     {
518         return this.instanceSpecification.createDependency(namedElement);
519     }
520 
521     /*public EList getTemplateBindings()
522     {
523         return this.instanceSpecification.getTemplateBindings();
524     }
525 
526     public TemplateBinding createTemplateBinding(EClass eClass)
527     {
528         return this.instanceSpecification.createTemplateBinding(eClass);
529     }
530 
531     public TemplateBinding createTemplateBinding()
532     {
533         return this.instanceSpecification.createTemplateBinding();
534     }
535 
536     public TemplateSignature getOwnedTemplateSignature()
537     {
538         return this.instanceSpecification.getOwnedTemplateSignature();
539     }
540 
541     public void setOwnedTemplateSignature(TemplateSignature templateSignature)
542     {
543         this.instanceSpecification.setOwnedTemplateSignature(templateSignature);
544     }
545 
546     public TemplateSignature createOwnedTemplateSignature(EClass eClass)
547     {
548         return this.instanceSpecification.createOwnedTemplateSignature(eClass);
549     }
550 
551     public TemplateSignature createOwnedTemplateSignature()
552     {
553         return this.instanceSpecification.createOwnedTemplateSignature();
554     }
555 
556     public Set parameterableElements()
557     {
558         return this.instanceSpecification.parameterableElements();
559     }*/
560 
561     /**
562      * @see org.eclipse.uml2.uml.Element#getOwnedElements()
563      */
564     public EList<Element> getOwnedElements()
565     {
566         return this.instanceSpecification.getOwnedElements();
567     }
568 
569     /**
570      * @see org.eclipse.uml2.uml.Element#getOwner()
571      */
572     public Element getOwner()
573     {
574         return this.instanceSpecification.getOwner();
575     }
576 
577     /**
578      * @see org.eclipse.uml2.uml.Element#getOwnedComments()
579      */
580     public EList<Comment> getOwnedComments()
581     {
582         return this.instanceSpecification.getOwnedComments();
583     }
584 
585     /**
586      * @param eClass
587      * @return instanceSpecification.createOwnedComment()
588      */
589     public Comment createOwnedComment(final EClass eClass)
590     {
591         return this.instanceSpecification.createOwnedComment();
592     }
593 
594     /**
595      * @see org.eclipse.uml2.uml.Element#createOwnedComment()
596      */
597     public Comment createOwnedComment()
598     {
599         return this.instanceSpecification.createOwnedComment();
600     }
601 
602     /**
603      * @see org.eclipse.uml2.uml.Element#validateNotOwnSelf(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
604      */
605     public boolean validateNotOwnSelf(final DiagnosticChain diagnosticChain, final Map<Object, Object> map)
606     {
607         return this.instanceSpecification.validateNotOwnSelf(diagnosticChain, map);
608     }
609 
610     /**
611      * @see org.eclipse.uml2.uml.Element#validateHasOwner(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
612      */
613     public boolean validateHasOwner(final DiagnosticChain diagnosticChain, final Map<Object, Object> map)
614     {
615         return this.instanceSpecification.validateHasOwner(diagnosticChain, map);
616     }
617 
618     /**
619      * @see org.eclipse.uml2.uml.Element#allOwnedElements()
620      */
621     public EList<Element> allOwnedElements()
622     {
623         return this.instanceSpecification.allOwnedElements();
624     }
625 
626     /**
627      * @see org.eclipse.uml2.uml.Element#mustBeOwned()
628      */
629     public boolean mustBeOwned()
630     {
631         return this.instanceSpecification.mustBeOwned();
632     }
633 
634     /**
635      * @see org.eclipse.uml2.uml.Element#createEAnnotation(String)
636      */
637     public EAnnotation createEAnnotation(final String string)
638     {
639         return this.instanceSpecification.createEAnnotation(string);
640     }
641 
642     /**
643      * @see org.eclipse.uml2.uml.Element#applyStereotype(org.eclipse.uml2.uml.Stereotype)
644      */
645     public EObject applyStereotype(final Stereotype stereotype)
646     {
647         return this.instanceSpecification.applyStereotype(stereotype);
648     }
649 
650     /**
651      * @see org.eclipse.uml2.uml.Element#getApplicableStereotype(String)
652      */
653     public Stereotype getApplicableStereotype(final String string)
654     {
655         return this.instanceSpecification.getApplicableStereotype(string);
656     }
657 
658     /**
659      * @see org.eclipse.uml2.uml.Element#getApplicableStereotypes()
660      */
661     public EList<Stereotype> getApplicableStereotypes()
662     {
663         return this.instanceSpecification.getApplicableStereotypes();
664     }
665 
666     /**
667      * @see org.eclipse.uml2.uml.Element#getAppliedStereotype(String)
668      */
669     public Stereotype getAppliedStereotype(final String string)
670     {
671         return this.instanceSpecification.getAppliedStereotype(string);
672     }
673 
674     /**
675      * @see org.eclipse.uml2.uml.Element#getAppliedStereotypes()
676      */
677     public EList<Stereotype> getAppliedStereotypes()
678     {
679         return this.instanceSpecification.getAppliedStereotypes();
680     }
681 
682     /**
683      * @see org.eclipse.uml2.uml.Element#getModel()
684      */
685     public Model getModel()
686     {
687         return (Model) UmlUtilities.findModel(this.instanceSpecification);
688     }
689 
690     /**
691      * @see org.eclipse.uml2.uml.Element#getNearestPackage()
692      */
693     public Package getNearestPackage()
694     {
695         return this.instanceSpecification.getNearestPackage();
696     }
697 
698     /**
699      * @see org.eclipse.uml2.uml.Element#getValue(org.eclipse.uml2.uml.Stereotype, String)
700      */
701     public Object getValue(final Stereotype stereotype, final String string)
702     {
703         return this.instanceSpecification.getValue(stereotype, string);
704     }
705 
706     /**
707      * @param stereotype
708      * @return instanceSpecification.isStereotypeApplied(stereotype)
709      */
710     public boolean isApplied(final Stereotype stereotype)
711     {
712         return this.instanceSpecification.isStereotypeApplied(stereotype);
713     }
714 
715     /**
716      * @param stereotype
717      * @return instanceSpecification.isStereotypeRequired(stereotype)
718      */
719     public boolean isRequired(final Stereotype stereotype)
720     {
721         return this.instanceSpecification.isStereotypeRequired(stereotype);
722     }
723 
724     /**
725      * @see org.eclipse.uml2.uml.Element#setValue(org.eclipse.uml2.uml.Stereotype, String, Object)
726      */
727     public void setValue(final Stereotype stereotype, final String string, final Object object)
728     {
729         this.instanceSpecification.setValue(stereotype, string, object);
730     }
731 
732     /**
733      * @see org.eclipse.uml2.uml.Element#hasValue(org.eclipse.uml2.uml.Stereotype, String)
734      */
735     public boolean hasValue(final Stereotype stereotype, final String string)
736     {
737         return this.instanceSpecification.hasValue(stereotype, string);
738     }
739 
740     /*public void unapply(Stereotype stereotype)
741     {
742         this.instanceSpecification.unapply(stereotype);
743     }*/
744 
745     /**
746      * @see org.eclipse.uml2.uml.Element#unapplyStereotype(org.eclipse.uml2.uml.Stereotype)
747      */
748     public EObject unapplyStereotype(final Stereotype stereotype)
749     {
750         return this.instanceSpecification.unapplyStereotype(stereotype);
751     }
752 
753     /**
754      * @see org.eclipse.uml2.uml.Element#destroy()
755      */
756     public void destroy()
757     {
758         this.instanceSpecification.destroy();
759     }
760 
761    /* public String getAppliedVersion(Stereotype stereotype)
762     {
763         return this.instanceSpecification.getAppliedVersion(stereotype);
764     }*/
765 
766     /**
767      * @see org.eclipse.uml2.uml.Element#addKeyword(String)
768      */
769     public boolean addKeyword(final String string)
770     {
771         return this.instanceSpecification.addKeyword(string);
772     }
773 
774     /**
775      * @see org.eclipse.uml2.uml.Element#getKeywords()
776      */
777     public EList<String> getKeywords()
778     {
779         return this.instanceSpecification.getKeywords();
780     }
781 
782     /**
783      * @see org.eclipse.uml2.uml.Element#hasKeyword(String)
784      */
785     public boolean hasKeyword(final String string)
786     {
787         return this.instanceSpecification.hasKeyword(string);
788     }
789 
790     /**
791      * @see org.eclipse.uml2.uml.Element#removeKeyword(String)
792      */
793     public boolean removeKeyword(final String string)
794     {
795         return this.instanceSpecification.removeKeyword(string);
796     }
797 
798     /**
799      * @see org.eclipse.emf.ecore.EModelElement#getEAnnotations()
800      */
801     public EList<EAnnotation> getEAnnotations()
802     {
803         return this.instanceSpecification.getEAnnotations();
804     }
805 
806     /**
807      * @see org.eclipse.emf.ecore.EModelElement#getEAnnotation(String)
808      */
809     public EAnnotation getEAnnotation(final String string)
810     {
811         return this.instanceSpecification.getEAnnotation(string);
812     }
813 
814     /**
815      * @see org.eclipse.emf.common.notify.Notifier#eAdapters()
816      */
817     public EList<Adapter> eAdapters()
818     {
819         return this.instanceSpecification.eAdapters();
820     }
821 
822     /**
823      * @see org.eclipse.emf.common.notify.Notifier#eDeliver()
824      */
825     public boolean eDeliver()
826     {
827         return this.instanceSpecification.eDeliver();
828     }
829 
830     /**
831      * @see org.eclipse.emf.common.notify.Notifier#eSetDeliver(boolean)
832      */
833     public void eSetDeliver(final boolean deliver)
834     {
835         this.instanceSpecification.eSetDeliver(deliver);
836     }
837 
838     /**
839      * @see org.eclipse.emf.ecore.EObject#eIsProxy()
840      */
841     public boolean eIsProxy()
842     {
843         return this.instanceSpecification.eIsProxy();
844     }
845 
846     /**
847      * @see org.eclipse.emf.ecore.EObject#eClass()
848      */
849     public EClass eClass()
850     {
851         return this.instanceSpecification.eClass();
852     }
853 
854     /**
855      * @see org.eclipse.emf.ecore.EObject#eContainer()
856      */
857     public EObject eContainer()
858     {
859         return this.instanceSpecification.eContainer();
860     }
861 
862     /**
863      * @see org.eclipse.emf.ecore.EObject#eContents()
864      */
865     public EList<EObject> eContents()
866     {
867         return this.instanceSpecification.eContents();
868     }
869 
870     /**
871      * @see org.eclipse.emf.ecore.EObject#eCrossReferences()
872      */
873     public EList<EObject> eCrossReferences()
874     {
875         return this.instanceSpecification.eCrossReferences();
876     }
877 
878     /**
879      * @see org.eclipse.emf.ecore.EObject#eAllContents()
880      */
881     public TreeIterator<EObject> eAllContents()
882     {
883         return this.instanceSpecification.eAllContents();
884     }
885 
886     /**
887      * @see org.eclipse.emf.ecore.EObject#eContainmentFeature()
888      */
889     public EReference eContainmentFeature()
890     {
891         return this.instanceSpecification.eContainmentFeature();
892     }
893 
894     /**
895      * @see org.eclipse.emf.ecore.EObject#eContainingFeature()
896      */
897     public EStructuralFeature eContainingFeature()
898     {
899         return this.instanceSpecification.eContainingFeature();
900     }
901 
902     /**
903      * @see org.eclipse.emf.ecore.EObject#eResource()
904      */
905     public Resource eResource()
906     {
907         return this.instanceSpecification.eResource();
908     }
909 
910     /**
911      * @see org.eclipse.emf.ecore.EObject#eGet(org.eclipse.emf.ecore.EStructuralFeature)
912      */
913     public Object eGet(final EStructuralFeature eStructuralFeature)
914     {
915         return this.instanceSpecification.eGet(eStructuralFeature);
916     }
917 
918     /**
919      * @see org.eclipse.emf.common.notify.Notifier#eNotify(org.eclipse.emf.common.notify.Notification)
920      */
921     public void eNotify(final Notification notification)
922     {
923         this.instanceSpecification.eNotify(notification);
924     }
925 
926     /**
927      * @see org.eclipse.uml2.uml.InstanceSpecification#createSpecification(String, org.eclipse.uml2.uml.Type, org.eclipse.emf.ecore.EClass)
928      */
929     public ValueSpecification createSpecification(final String name, final Type type, final EClass eClass)
930     {
931         return this.instanceSpecification.createSpecification(name, type, eClass);
932     }
933 
934     /**
935      * @see org.eclipse.uml2.uml.InstanceSpecification#validateDefiningFeature(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
936      */
937     public boolean validateDefiningFeature(final DiagnosticChain diagnostics, final Map<Object, Object> context)
938     {
939         return this.instanceSpecification.validateDefiningFeature(diagnostics, context);
940     }
941 
942     /**
943      * @see org.eclipse.uml2.uml.InstanceSpecification#validateDeploymentArtifact(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
944      */
945     public boolean validateDeploymentArtifact(final DiagnosticChain diagnostics,
946         final Map<Object, Object> context)
947     {
948         return this.instanceSpecification.validateDeploymentArtifact(diagnostics, context);
949     }
950 
951     /**
952      * @see org.eclipse.uml2.uml.InstanceSpecification#validateDeploymentTarget(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
953      */
954     public boolean validateDeploymentTarget(final DiagnosticChain diagnostics, final Map<Object, Object> context)
955     {
956         return this.instanceSpecification.validateDeploymentTarget(diagnostics, context);
957     }
958 
959     /**
960      * @see org.eclipse.uml2.uml.InstanceSpecification#validateStructuralFeature(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
961      */
962     public boolean validateStructuralFeature(final DiagnosticChain diagnostics,
963         final Map<Object, Object> context)
964     {
965         return this.instanceSpecification.validateStructuralFeature(diagnostics, context);
966     }
967 
968     /**
969      * @see org.eclipse.uml2.uml.NamedElement#allOwningPackages()
970      */
971     public EList<Package> allOwningPackages()
972     {
973         return this.instanceSpecification.allOwningPackages();
974     }
975 
976     /**
977      * @see org.eclipse.uml2.uml.NamedElement#createNameExpression(String, org.eclipse.uml2.uml.Type)
978      */
979     public StringExpression createNameExpression(final String name, final Type type)
980     {
981         return this.instanceSpecification.createNameExpression(name, type);
982     }
983 
984     /**
985      * @see org.eclipse.uml2.uml.NamedElement#createUsage(org.eclipse.uml2.uml.NamedElement)
986      */
987     public Usage createUsage(final NamedElement supplier)
988     {
989         return this.instanceSpecification.createUsage(supplier);
990     }
991 
992     /**
993      * @see org.eclipse.uml2.uml.NamedElement#isSetName()
994      */
995     public boolean isSetName()
996     {
997         return this.instanceSpecification.isSetName();
998     }
999 
1000     /**
1001      * @see org.eclipse.uml2.uml.NamedElement#isSetVisibility()
1002      */
1003     public boolean isSetVisibility()
1004     {
1005         return this.instanceSpecification.isSetVisibility();
1006     }
1007 
1008     /**
1009      * @see org.eclipse.uml2.uml.NamedElement#unsetName()
1010      */
1011     public void unsetName()
1012     {
1013         this.instanceSpecification.unsetName();
1014     }
1015 
1016     /**
1017      * @see org.eclipse.uml2.uml.NamedElement#unsetVisibility()
1018      */
1019     public void unsetVisibility()
1020     {
1021         this.instanceSpecification.unsetVisibility();
1022     }
1023 
1024     /**
1025      * @see org.eclipse.uml2.uml.Element#getAppliedSubstereotype(org.eclipse.uml2.uml.Stereotype, String)
1026      */
1027     public Stereotype getAppliedSubstereotype(final Stereotype stereotype, final String qualifiedName)
1028     {
1029         return this.instanceSpecification.getAppliedSubstereotype(stereotype, qualifiedName);
1030     }
1031 
1032     /**
1033      * @see org.eclipse.uml2.uml.Element#getAppliedSubstereotypes(org.eclipse.uml2.uml.Stereotype)
1034      */
1035     public EList<Stereotype> getAppliedSubstereotypes(final Stereotype stereotype)
1036     {
1037         return this.instanceSpecification.getAppliedSubstereotypes(stereotype);
1038     }
1039 
1040     /**
1041      * @see org.eclipse.uml2.uml.Element#getRelationships()
1042      */
1043     public EList<Relationship> getRelationships()
1044     {
1045         return this.instanceSpecification.getRelationships();
1046     }
1047 
1048     /**
1049      * @see org.eclipse.uml2.uml.Element#getRelationships(org.eclipse.emf.ecore.EClass)
1050      */
1051     public EList<Relationship> getRelationships(final EClass eClass)
1052     {
1053         return this.instanceSpecification.getRelationships(eClass);
1054     }
1055 
1056     /**
1057      * @see org.eclipse.uml2.uml.Element#getRequiredStereotype(String)
1058      */
1059     public Stereotype getRequiredStereotype(final String qualifiedName)
1060     {
1061         return this.instanceSpecification.getRequiredStereotype(qualifiedName);
1062     }
1063 
1064     /**
1065      * @see org.eclipse.uml2.uml.Element#getRequiredStereotypes()
1066      */
1067     public EList<Stereotype> getRequiredStereotypes()
1068     {
1069         return this.instanceSpecification.getRequiredStereotypes();
1070     }
1071 
1072     /**
1073      * @see org.eclipse.uml2.uml.Element#getSourceDirectedRelationships()
1074      */
1075     public EList<DirectedRelationship> getSourceDirectedRelationships()
1076     {
1077         return this.instanceSpecification.getSourceDirectedRelationships();
1078     }
1079 
1080     /**
1081      * @see org.eclipse.uml2.uml.Element#getSourceDirectedRelationships(org.eclipse.emf.ecore.EClass)
1082      */
1083     public EList<DirectedRelationship> getSourceDirectedRelationships(final EClass eClass)
1084     {
1085         return this.instanceSpecification.getSourceDirectedRelationships(eClass);
1086     }
1087 
1088     /**
1089      * @see org.eclipse.uml2.uml.Element#getStereotypeApplication(org.eclipse.uml2.uml.Stereotype)
1090      */
1091     public EObject getStereotypeApplication(final Stereotype stereotype)
1092     {
1093         return this.instanceSpecification.getStereotypeApplication(stereotype);
1094     }
1095 
1096     /**
1097      * @see org.eclipse.uml2.uml.Element#getStereotypeApplications()
1098      */
1099     public EList<EObject> getStereotypeApplications()
1100     {
1101         return this.instanceSpecification.getStereotypeApplications();
1102     }
1103 
1104     /**
1105      * @see org.eclipse.uml2.uml.Element#getTargetDirectedRelationships()
1106      */
1107     public EList<DirectedRelationship> getTargetDirectedRelationships()
1108     {
1109         return this.instanceSpecification.getTargetDirectedRelationships();
1110     }
1111 
1112     /**
1113      * @see org.eclipse.uml2.uml.Element#getTargetDirectedRelationships(org.eclipse.emf.ecore.EClass)
1114      */
1115     public EList<DirectedRelationship> getTargetDirectedRelationships(final EClass eClass)
1116     {
1117         return this.instanceSpecification.getTargetDirectedRelationships(eClass);
1118     }
1119 
1120     /**
1121      * @see org.eclipse.uml2.uml.Element#isStereotypeApplicable(org.eclipse.uml2.uml.Stereotype)
1122      */
1123     public boolean isStereotypeApplicable(final Stereotype stereotype)
1124     {
1125         return this.instanceSpecification.isStereotypeApplicable(stereotype);
1126     }
1127 
1128     /**
1129      * @see org.eclipse.uml2.uml.Element#isStereotypeApplied(org.eclipse.uml2.uml.Stereotype)
1130      */
1131     public boolean isStereotypeApplied(final Stereotype stereotype)
1132     {
1133         return this.instanceSpecification.isStereotypeApplied(stereotype);
1134     }
1135 
1136     /**
1137      * @see org.eclipse.uml2.uml.Element#isStereotypeRequired(org.eclipse.uml2.uml.Stereotype)
1138      */
1139     public boolean isStereotypeRequired(final Stereotype stereotype)
1140     {
1141         return this.instanceSpecification.isStereotypeRequired(stereotype);
1142     }
1143 
1144     /**
1145      * @see org.eclipse.uml2.uml.ParameterableElement#getOwningTemplateParameter()
1146      */
1147     public TemplateParameter getOwningTemplateParameter()
1148     {
1149         return this.instanceSpecification.getTemplateParameter();
1150     }
1151 
1152     /**
1153      * @see org.eclipse.uml2.uml.ParameterableElement#isCompatibleWith(org.eclipse.uml2.uml.ParameterableElement)
1154      */
1155     public boolean isCompatibleWith(final ParameterableElement param)
1156     {
1157         return this.instanceSpecification.isCompatibleWith(param);
1158     }
1159 
1160     /**
1161      * @see org.eclipse.uml2.uml.ParameterableElement#isTemplateParameter()
1162      */
1163     public boolean isTemplateParameter()
1164     {
1165         return this.instanceSpecification.isTemplateParameter();
1166     }
1167 
1168     /**
1169      * @see org.eclipse.uml2.uml.ParameterableElement#setOwningTemplateParameter(org.eclipse.uml2.uml.TemplateParameter)
1170      */
1171     public void setOwningTemplateParameter(final TemplateParameter value)
1172     {
1173         this.instanceSpecification.setOwningTemplateParameter(value);
1174     }
1175 
1176     /**
1177      * UML2 3.1 (Eclipse 3.6) only
1178      * @see org.eclipse.emf.ecore.EObject#eInvoke(org.eclipse.emf.ecore.EOperation, org.eclipse.emf.common.util.EList)
1179      */
1180     public Object eInvoke(final EOperation operation, final EList<?> arguments) throws InvocationTargetException
1181     {
1182         return this.instanceSpecification.eInvoke(operation, arguments);
1183     }
1184 
1185     /**
1186      * UML2 5.0 (Eclipse 4.4) only
1187      * @see org.eclipse.uml2.uml.InstanceSpecification#validateNamespaceNeedsVisibility(org.eclipse.emf.common.util.DiagnosticChain, Map)
1188      */
1189     @Override
1190     public boolean validateNamespaceNeedsVisibility(DiagnosticChain diagnostics, Map<Object, Object> context)
1191     {
1192         return this.instanceSpecification.validateNamespaceNeedsVisibility(diagnostics, context);
1193     }
1194 }