View Javadoc

1   //
2   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
3   //
4   package org.andromda.metafacades.uml14;
5   
6   /***
7    * MetafacadeLogic for org.andromda.metafacades.uml.AttributeFacade
8    *
9    * @see org.andromda.metafacades.uml.AttributeFacade
10   */
11  public abstract class AttributeFacadeLogic
12      extends org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl
13      implements org.andromda.metafacades.uml.AttributeFacade
14  {
15  
16      protected org.omg.uml.foundation.core.Attribute metaObject;
17  
18      public AttributeFacadeLogic(org.omg.uml.foundation.core.Attribute metaObject, String context)
19      {
20          super(metaObject, getContext(context));
21          this.metaObject = metaObject;
22      }
23  
24      /***
25       * Gets the context for this metafacade logic instance.
26       */
27      private static String getContext(String context)
28      {
29          if (context == null)
30          {
31              context = "org.andromda.metafacades.uml.AttributeFacade";
32          }
33          return context;
34      }
35  
36      /***
37       * @see org.andromda.core.metafacade.MetafacadeBase
38       */
39      public void resetMetafacadeContext(String context)
40      {
41          if (!this.contextRoot) // reset context only for non-root metafacades
42          {
43              context = getContext(context);  // to have same value as in original constructor call
44              setMetafacadeContext (context);
45          }
46      }
47  
48      /***
49       * @see org.andromda.metafacades.uml.AttributeFacade
50       */
51      public boolean isAttributeFacadeMetaType()
52      {
53          return true;
54      }
55      
56      // --------------- attributes ---------------------
57  
58     /***
59      * @see org.andromda.metafacades.uml.AttributeFacade#getGetterName()
60      */
61      protected abstract java.lang.String handleGetGetterName();
62  
63      private void handleGetGetterName1aPreCondition()
64      {
65      }
66  
67      private void handleGetGetterName1aPostCondition()
68      {
69      }
70  
71      private java.lang.String __getterName1a;
72      private boolean __getterName1aSet = false;
73  
74      public final java.lang.String getGetterName()
75      {
76          java.lang.String getterName1a = this.__getterName1a;
77          if (!this.__getterName1aSet)
78          {
79              handleGetGetterName1aPreCondition();
80              getterName1a = handleGetGetterName();
81              handleGetGetterName1aPostCondition();
82              this.__getterName1a = getterName1a;
83              if (isMetafacadePropertyCachingEnabled())
84              {
85                  this.__getterName1aSet = true;
86              }
87          }
88          return getterName1a;
89      }
90  
91     /***
92      * @see org.andromda.metafacades.uml.AttributeFacade#getSetterName()
93      */
94      protected abstract java.lang.String handleGetSetterName();
95  
96      private void handleGetSetterName2aPreCondition()
97      {
98      }
99  
100     private void handleGetSetterName2aPostCondition()
101     {
102     }
103 
104     private java.lang.String __setterName2a;
105     private boolean __setterName2aSet = false;
106 
107     public final java.lang.String getSetterName()
108     {
109         java.lang.String setterName2a = this.__setterName2a;
110         if (!this.__setterName2aSet)
111         {
112             handleGetSetterName2aPreCondition();
113             setterName2a = handleGetSetterName();
114             handleGetSetterName2aPostCondition();
115             this.__setterName2a = setterName2a;
116             if (isMetafacadePropertyCachingEnabled())
117             {
118                 this.__setterName2aSet = true;
119             }
120         }
121         return setterName2a;
122     }
123 
124    /***
125     * @see org.andromda.metafacades.uml.AttributeFacade#isReadOnly()
126     */
127     protected abstract boolean handleIsReadOnly();
128 
129     private void handleIsReadOnly3aPreCondition()
130     {
131     }
132 
133     private void handleIsReadOnly3aPostCondition()
134     {
135     }
136 
137     private boolean __readOnly3a;
138     private boolean __readOnly3aSet = false;
139 
140     public final boolean isReadOnly()
141     {
142         boolean readOnly3a = this.__readOnly3a;
143         if (!this.__readOnly3aSet)
144         {
145             handleIsReadOnly3aPreCondition();
146             readOnly3a = handleIsReadOnly();
147             handleIsReadOnly3aPostCondition();
148             this.__readOnly3a = readOnly3a;
149             if (isMetafacadePropertyCachingEnabled())
150             {
151                 this.__readOnly3aSet = true;
152             }
153         }
154         return readOnly3a;
155     }
156 
157    /***
158     * @see org.andromda.metafacades.uml.AttributeFacade#getDefaultValue()
159     */
160     protected abstract java.lang.String handleGetDefaultValue();
161 
162     private void handleGetDefaultValue4aPreCondition()
163     {
164     }
165 
166     private void handleGetDefaultValue4aPostCondition()
167     {
168     }
169 
170     private java.lang.String __defaultValue4a;
171     private boolean __defaultValue4aSet = false;
172 
173     public final java.lang.String getDefaultValue()
174     {
175         java.lang.String defaultValue4a = this.__defaultValue4a;
176         if (!this.__defaultValue4aSet)
177         {
178             handleGetDefaultValue4aPreCondition();
179             defaultValue4a = handleGetDefaultValue();
180             handleGetDefaultValue4aPostCondition();
181             this.__defaultValue4a = defaultValue4a;
182             if (isMetafacadePropertyCachingEnabled())
183             {
184                 this.__defaultValue4aSet = true;
185             }
186         }
187         return defaultValue4a;
188     }
189 
190    /***
191     * @see org.andromda.metafacades.uml.AttributeFacade#isStatic()
192     */
193     protected abstract boolean handleIsStatic();
194 
195     private void handleIsStatic5aPreCondition()
196     {
197     }
198 
199     private void handleIsStatic5aPostCondition()
200     {
201     }
202 
203     private boolean __static5a;
204     private boolean __static5aSet = false;
205 
206     public final boolean isStatic()
207     {
208         boolean static5a = this.__static5a;
209         if (!this.__static5aSet)
210         {
211             handleIsStatic5aPreCondition();
212             static5a = handleIsStatic();
213             handleIsStatic5aPostCondition();
214             this.__static5a = static5a;
215             if (isMetafacadePropertyCachingEnabled())
216             {
217                 this.__static5aSet = true;
218             }
219         }
220         return static5a;
221     }
222 
223    /***
224     * @see org.andromda.metafacades.uml.AttributeFacade#isRequired()
225     */
226     protected abstract boolean handleIsRequired();
227 
228     private void handleIsRequired6aPreCondition()
229     {
230     }
231 
232     private void handleIsRequired6aPostCondition()
233     {
234     }
235 
236     private boolean __required6a;
237     private boolean __required6aSet = false;
238 
239     public final boolean isRequired()
240     {
241         boolean required6a = this.__required6a;
242         if (!this.__required6aSet)
243         {
244             handleIsRequired6aPreCondition();
245             required6a = handleIsRequired();
246             handleIsRequired6aPostCondition();
247             this.__required6a = required6a;
248             if (isMetafacadePropertyCachingEnabled())
249             {
250                 this.__required6aSet = true;
251             }
252         }
253         return required6a;
254     }
255 
256    /***
257     * @see org.andromda.metafacades.uml.AttributeFacade#isMany()
258     */
259     protected abstract boolean handleIsMany();
260 
261     private void handleIsMany7aPreCondition()
262     {
263     }
264 
265     private void handleIsMany7aPostCondition()
266     {
267     }
268 
269     private boolean __many7a;
270     private boolean __many7aSet = false;
271 
272     public final boolean isMany()
273     {
274         boolean many7a = this.__many7a;
275         if (!this.__many7aSet)
276         {
277             handleIsMany7aPreCondition();
278             many7a = handleIsMany();
279             handleIsMany7aPostCondition();
280             this.__many7a = many7a;
281             if (isMetafacadePropertyCachingEnabled())
282             {
283                 this.__many7aSet = true;
284             }
285         }
286         return many7a;
287     }
288 
289    /***
290     * @see org.andromda.metafacades.uml.AttributeFacade#isChangeable()
291     */
292     protected abstract boolean handleIsChangeable();
293 
294     private void handleIsChangeable8aPreCondition()
295     {
296     }
297 
298     private void handleIsChangeable8aPostCondition()
299     {
300     }
301 
302     private boolean __changeable8a;
303     private boolean __changeable8aSet = false;
304 
305     public final boolean isChangeable()
306     {
307         boolean changeable8a = this.__changeable8a;
308         if (!this.__changeable8aSet)
309         {
310             handleIsChangeable8aPreCondition();
311             changeable8a = handleIsChangeable();
312             handleIsChangeable8aPostCondition();
313             this.__changeable8a = changeable8a;
314             if (isMetafacadePropertyCachingEnabled())
315             {
316                 this.__changeable8aSet = true;
317             }
318         }
319         return changeable8a;
320     }
321 
322    /***
323     * @see org.andromda.metafacades.uml.AttributeFacade#isAddOnly()
324     */
325     protected abstract boolean handleIsAddOnly();
326 
327     private void handleIsAddOnly9aPreCondition()
328     {
329     }
330 
331     private void handleIsAddOnly9aPostCondition()
332     {
333     }
334 
335     private boolean __addOnly9a;
336     private boolean __addOnly9aSet = false;
337 
338     public final boolean isAddOnly()
339     {
340         boolean addOnly9a = this.__addOnly9a;
341         if (!this.__addOnly9aSet)
342         {
343             handleIsAddOnly9aPreCondition();
344             addOnly9a = handleIsAddOnly();
345             handleIsAddOnly9aPostCondition();
346             this.__addOnly9a = addOnly9a;
347             if (isMetafacadePropertyCachingEnabled())
348             {
349                 this.__addOnly9aSet = true;
350             }
351         }
352         return addOnly9a;
353     }
354 
355    /***
356     * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationLiteral()
357     */
358     protected abstract boolean handleIsEnumerationLiteral();
359 
360     private void handleIsEnumerationLiteral10aPreCondition()
361     {
362     }
363 
364     private void handleIsEnumerationLiteral10aPostCondition()
365     {
366     }
367 
368     private boolean __enumerationLiteral10a;
369     private boolean __enumerationLiteral10aSet = false;
370 
371     public final boolean isEnumerationLiteral()
372     {
373         boolean enumerationLiteral10a = this.__enumerationLiteral10a;
374         if (!this.__enumerationLiteral10aSet)
375         {
376             handleIsEnumerationLiteral10aPreCondition();
377             enumerationLiteral10a = handleIsEnumerationLiteral();
378             handleIsEnumerationLiteral10aPostCondition();
379             this.__enumerationLiteral10a = enumerationLiteral10a;
380             if (isMetafacadePropertyCachingEnabled())
381             {
382                 this.__enumerationLiteral10aSet = true;
383             }
384         }
385         return enumerationLiteral10a;
386     }
387 
388    /***
389     * @see org.andromda.metafacades.uml.AttributeFacade#getEnumerationValue()
390     */
391     protected abstract java.lang.String handleGetEnumerationValue();
392 
393     private void handleGetEnumerationValue11aPreCondition()
394     {
395     }
396 
397     private void handleGetEnumerationValue11aPostCondition()
398     {
399     }
400 
401     private java.lang.String __enumerationValue11a;
402     private boolean __enumerationValue11aSet = false;
403 
404     public final java.lang.String getEnumerationValue()
405     {
406         java.lang.String enumerationValue11a = this.__enumerationValue11a;
407         if (!this.__enumerationValue11aSet)
408         {
409             handleGetEnumerationValue11aPreCondition();
410             enumerationValue11a = handleGetEnumerationValue();
411             handleGetEnumerationValue11aPostCondition();
412             this.__enumerationValue11a = enumerationValue11a;
413             if (isMetafacadePropertyCachingEnabled())
414             {
415                 this.__enumerationValue11aSet = true;
416             }
417         }
418         return enumerationValue11a;
419     }
420 
421    /***
422     * @see org.andromda.metafacades.uml.AttributeFacade#getGetterSetterTypeName()
423     */
424     protected abstract java.lang.String handleGetGetterSetterTypeName();
425 
426     private void handleGetGetterSetterTypeName12aPreCondition()
427     {
428     }
429 
430     private void handleGetGetterSetterTypeName12aPostCondition()
431     {
432     }
433 
434     private java.lang.String __getterSetterTypeName12a;
435     private boolean __getterSetterTypeName12aSet = false;
436 
437     public final java.lang.String getGetterSetterTypeName()
438     {
439         java.lang.String getterSetterTypeName12a = this.__getterSetterTypeName12a;
440         if (!this.__getterSetterTypeName12aSet)
441         {
442             handleGetGetterSetterTypeName12aPreCondition();
443             getterSetterTypeName12a = handleGetGetterSetterTypeName();
444             handleGetGetterSetterTypeName12aPostCondition();
445             this.__getterSetterTypeName12a = getterSetterTypeName12a;
446             if (isMetafacadePropertyCachingEnabled())
447             {
448                 this.__getterSetterTypeName12aSet = true;
449             }
450         }
451         return getterSetterTypeName12a;
452     }
453 
454    /***
455     * @see org.andromda.metafacades.uml.AttributeFacade#isOrdered()
456     */
457     protected abstract boolean handleIsOrdered();
458 
459     private void handleIsOrdered13aPreCondition()
460     {
461     }
462 
463     private void handleIsOrdered13aPostCondition()
464     {
465     }
466 
467     private boolean __ordered13a;
468     private boolean __ordered13aSet = false;
469 
470     public final boolean isOrdered()
471     {
472         boolean ordered13a = this.__ordered13a;
473         if (!this.__ordered13aSet)
474         {
475             handleIsOrdered13aPreCondition();
476             ordered13a = handleIsOrdered();
477             handleIsOrdered13aPostCondition();
478             this.__ordered13a = ordered13a;
479             if (isMetafacadePropertyCachingEnabled())
480             {
481                 this.__ordered13aSet = true;
482             }
483         }
484         return ordered13a;
485     }
486 
487    /***
488     * @see org.andromda.metafacades.uml.AttributeFacade#isDefaultValuePresent()
489     */
490     protected abstract boolean handleIsDefaultValuePresent();
491 
492     private void handleIsDefaultValuePresent14aPreCondition()
493     {
494     }
495 
496     private void handleIsDefaultValuePresent14aPostCondition()
497     {
498     }
499 
500     private boolean __defaultValuePresent14a;
501     private boolean __defaultValuePresent14aSet = false;
502 
503     public final boolean isDefaultValuePresent()
504     {
505         boolean defaultValuePresent14a = this.__defaultValuePresent14a;
506         if (!this.__defaultValuePresent14aSet)
507         {
508             handleIsDefaultValuePresent14aPreCondition();
509             defaultValuePresent14a = handleIsDefaultValuePresent();
510             handleIsDefaultValuePresent14aPostCondition();
511             this.__defaultValuePresent14a = defaultValuePresent14a;
512             if (isMetafacadePropertyCachingEnabled())
513             {
514                 this.__defaultValuePresent14aSet = true;
515             }
516         }
517         return defaultValuePresent14a;
518     }
519 
520    /***
521     * @see org.andromda.metafacades.uml.AttributeFacade#getUpper()
522     */
523     protected abstract int handleGetUpper();
524 
525     private void handleGetUpper15aPreCondition()
526     {
527     }
528 
529     private void handleGetUpper15aPostCondition()
530     {
531     }
532 
533     private int __upper15a;
534     private boolean __upper15aSet = false;
535 
536     public final int getUpper()
537     {
538         int upper15a = this.__upper15a;
539         if (!this.__upper15aSet)
540         {
541             handleGetUpper15aPreCondition();
542             upper15a = handleGetUpper();
543             handleGetUpper15aPostCondition();
544             this.__upper15a = upper15a;
545             if (isMetafacadePropertyCachingEnabled())
546             {
547                 this.__upper15aSet = true;
548             }
549         }
550         return upper15a;
551     }
552 
553    /***
554     * @see org.andromda.metafacades.uml.AttributeFacade#getLower()
555     */
556     protected abstract int handleGetLower();
557 
558     private void handleGetLower16aPreCondition()
559     {
560     }
561 
562     private void handleGetLower16aPostCondition()
563     {
564     }
565 
566     private int __lower16a;
567     private boolean __lower16aSet = false;
568 
569     public final int getLower()
570     {
571         int lower16a = this.__lower16a;
572         if (!this.__lower16aSet)
573         {
574             handleGetLower16aPreCondition();
575             lower16a = handleGetLower();
576             handleGetLower16aPostCondition();
577             this.__lower16a = lower16a;
578             if (isMetafacadePropertyCachingEnabled())
579             {
580                 this.__lower16aSet = true;
581             }
582         }
583         return lower16a;
584     }
585 
586    /***
587     * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationMember()
588     */
589     protected abstract boolean handleIsEnumerationMember();
590 
591     private void handleIsEnumerationMember17aPreCondition()
592     {
593     }
594 
595     private void handleIsEnumerationMember17aPostCondition()
596     {
597     }
598 
599     private boolean __enumerationMember17a;
600     private boolean __enumerationMember17aSet = false;
601 
602     public final boolean isEnumerationMember()
603     {
604         boolean enumerationMember17a = this.__enumerationMember17a;
605         if (!this.__enumerationMember17aSet)
606         {
607             handleIsEnumerationMember17aPreCondition();
608             enumerationMember17a = handleIsEnumerationMember();
609             handleIsEnumerationMember17aPostCondition();
610             this.__enumerationMember17a = enumerationMember17a;
611             if (isMetafacadePropertyCachingEnabled())
612             {
613                 this.__enumerationMember17aSet = true;
614             }
615         }
616         return enumerationMember17a;
617     }
618 
619    /***
620     * @see org.andromda.metafacades.uml.AttributeFacade#getEnumerationLiteralParameters()
621     */
622     protected abstract java.lang.String handleGetEnumerationLiteralParameters();
623 
624     private void handleGetEnumerationLiteralParameters18aPreCondition()
625     {
626     }
627 
628     private void handleGetEnumerationLiteralParameters18aPostCondition()
629     {
630     }
631 
632     private java.lang.String __enumerationLiteralParameters18a;
633     private boolean __enumerationLiteralParameters18aSet = false;
634 
635     public final java.lang.String getEnumerationLiteralParameters()
636     {
637         java.lang.String enumerationLiteralParameters18a = this.__enumerationLiteralParameters18a;
638         if (!this.__enumerationLiteralParameters18aSet)
639         {
640             handleGetEnumerationLiteralParameters18aPreCondition();
641             enumerationLiteralParameters18a = handleGetEnumerationLiteralParameters();
642             handleGetEnumerationLiteralParameters18aPostCondition();
643             this.__enumerationLiteralParameters18a = enumerationLiteralParameters18a;
644             if (isMetafacadePropertyCachingEnabled())
645             {
646                 this.__enumerationLiteralParameters18aSet = true;
647             }
648         }
649         return enumerationLiteralParameters18a;
650     }
651 
652    /***
653     * @see org.andromda.metafacades.uml.AttributeFacade#isEnumerationLiteralParametersExist()
654     */
655     protected abstract boolean handleIsEnumerationLiteralParametersExist();
656 
657     private void handleIsEnumerationLiteralParametersExist19aPreCondition()
658     {
659     }
660 
661     private void handleIsEnumerationLiteralParametersExist19aPostCondition()
662     {
663     }
664 
665     private boolean __enumerationLiteralParametersExist19a;
666     private boolean __enumerationLiteralParametersExist19aSet = false;
667 
668     public final boolean isEnumerationLiteralParametersExist()
669     {
670         boolean enumerationLiteralParametersExist19a = this.__enumerationLiteralParametersExist19a;
671         if (!this.__enumerationLiteralParametersExist19aSet)
672         {
673             handleIsEnumerationLiteralParametersExist19aPreCondition();
674             enumerationLiteralParametersExist19a = handleIsEnumerationLiteralParametersExist();
675             handleIsEnumerationLiteralParametersExist19aPostCondition();
676             this.__enumerationLiteralParametersExist19a = enumerationLiteralParametersExist19a;
677             if (isMetafacadePropertyCachingEnabled())
678             {
679                 this.__enumerationLiteralParametersExist19aSet = true;
680             }
681         }
682         return enumerationLiteralParametersExist19a;
683     }
684 
685     // ---------------- business methods ----------------------
686 
687     protected abstract java.lang.Object handleFindTaggedValue(java.lang.String name, boolean follow);
688 
689     private void handleFindTaggedValue1oPreCondition()
690     {
691     }
692 
693     private void handleFindTaggedValue1oPostCondition()
694     {
695     }
696 
697     public java.lang.Object findTaggedValue(java.lang.String name, boolean follow)
698     {
699         handleFindTaggedValue1oPreCondition();
700         java.lang.Object returnValue = handleFindTaggedValue(name, follow);
701         handleFindTaggedValue1oPostCondition();
702         return returnValue;
703     }
704 
705     // ------------- associations ------------------
706 
707     private void handleGetOwner1rPreCondition()
708     {
709     }
710 
711     private void handleGetOwner1rPostCondition()
712     {
713     }
714 
715     public final org.andromda.metafacades.uml.ClassifierFacade getOwner()
716     {
717         org.andromda.metafacades.uml.ClassifierFacade getOwner1r = null;
718         handleGetOwner1rPreCondition();
719         Object result = this.shieldedElement(handleGetOwner());
720         try
721         {
722             getOwner1r = (org.andromda.metafacades.uml.ClassifierFacade)result;
723         }
724         catch (ClassCastException ex)
725         {
726             // ignore since the metafacade shouldn't
727             // be set if its not of the correct type
728         }
729         handleGetOwner1rPostCondition();
730         return getOwner1r;
731     }
732 
733     protected abstract java.lang.Object handleGetOwner();
734 
735     private void handleGetType2rPreCondition()
736     {
737     }
738 
739     private void handleGetType2rPostCondition()
740     {
741     }
742 
743     public final org.andromda.metafacades.uml.ClassifierFacade getType()
744     {
745         org.andromda.metafacades.uml.ClassifierFacade getType2r = null;
746         handleGetType2rPreCondition();
747         Object result = this.shieldedElement(handleGetType());
748         try
749         {
750             getType2r = (org.andromda.metafacades.uml.ClassifierFacade)result;
751         }
752         catch (ClassCastException ex)
753         {
754             // ignore since the metafacade shouldn't
755             // be set if its not of the correct type
756         }
757         handleGetType2rPostCondition();
758         return getType2r;
759     }
760 
761     protected abstract java.lang.Object handleGetType();
762 
763     private void handleGetEnumeration5rPreCondition()
764     {
765     }
766 
767     private void handleGetEnumeration5rPostCondition()
768     {
769     }
770 
771     public final org.andromda.metafacades.uml.EnumerationFacade getEnumeration()
772     {
773         org.andromda.metafacades.uml.EnumerationFacade getEnumeration5r = null;
774         handleGetEnumeration5rPreCondition();
775         Object result = this.shieldedElement(handleGetEnumeration());
776         try
777         {
778             getEnumeration5r = (org.andromda.metafacades.uml.EnumerationFacade)result;
779         }
780         catch (ClassCastException ex)
781         {
782             // ignore since the metafacade shouldn't
783             // be set if its not of the correct type
784         }
785         handleGetEnumeration5rPostCondition();
786         return getEnumeration5r;
787     }
788 
789     protected abstract java.lang.Object handleGetEnumeration();
790 
791     /***
792      * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
793      */
794     public void validateInvariants(java.util.Collection validationMessages)
795     {
796         super.validateInvariants(validationMessages);
797         {
798             final java.lang.Object contextElement = this.THIS(); boolean constraintValid = org.andromda.translation.ocl.validation.OCLResultEnsurer.ensure(org.andromda.translation.ocl.validation.OCLCollections.notEmpty(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"type"))); 
799             if (!constraintValid)
800                 validationMessages.add(
801                     new org.andromda.core.metafacade.ModelValidationMessage(
802                         (org.andromda.core.metafacade.MetafacadeBase)contextElement ,
803                         "org::andromda::metafacades::uml::AttributeFacade::attribute needs a type",
804                         "Each attribute needs a type, you cannot leave the type unspecified."));
805         }
806         {
807             final java.lang.Object contextElement = this.THIS(); boolean constraintValid = org.andromda.translation.ocl.validation.OCLResultEnsurer.ensure(org.andromda.translation.ocl.validation.OCLCollections.notEmpty(org.andromda.translation.ocl.validation.OCLIntrospector.invoke(contextElement,"name"))); 
808             if (!constraintValid)
809                 validationMessages.add(
810                     new org.andromda.core.metafacade.ModelValidationMessage(
811                         (org.andromda.core.metafacade.MetafacadeBase)contextElement ,
812                         "org::andromda::metafacades::uml::AttributeFacade::attribute must have a name",
813                         "Each attribute must have a non-empty name."));
814         }
815     }
816     
817     /***
818      * The property that stores the name of the metafacade.
819      */
820     private static final String NAME_PROPERTY = "name";
821     
822     /***
823      * @see java.lang.Object#toString()
824      */
825     public String toString()
826     {
827         final StringBuffer toString = new StringBuffer(this.getClass().getName());
828         toString.append("[");
829         try
830         {
831             toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
832         }
833         catch (final Throwable throwable)
834         {
835             // - just ignore when the metafacade doesn't have a name property
836         }
837         toString.append("]");
838         return toString.toString();
839     }
840 }