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