1
2
3
4
5 package org.andromda.metafacades.uml14;
6
7 import java.util.Collection;
8 import java.util.List;
9 import org.andromda.core.common.Introspector;
10 import org.andromda.core.metafacade.MetafacadeBase;
11 import org.andromda.core.metafacade.ModelValidationMessage;
12 import org.andromda.metafacades.uml.ConstraintFacade;
13 import org.andromda.metafacades.uml.DependencyFacade;
14 import org.andromda.metafacades.uml.ModelElementFacade;
15 import org.andromda.metafacades.uml.ModelFacade;
16 import org.andromda.metafacades.uml.PackageFacade;
17 import org.andromda.metafacades.uml.StateMachineFacade;
18 import org.andromda.metafacades.uml.StereotypeFacade;
19 import org.andromda.metafacades.uml.TaggedValueFacade;
20 import org.andromda.metafacades.uml.TemplateParameterFacade;
21 import org.andromda.metafacades.uml.TypeMappings;
22 import org.apache.log4j.Logger;
23 import org.omg.uml.foundation.core.ModelElement;
24
25
26
27
28
29
30
31
32
33 public abstract class ModelElementFacadeLogic
34 extends MetafacadeBase
35 implements ModelElementFacade
36 {
37
38
39
40
41 protected ModelElement metaObject;
42
43
44
45
46
47 protected ModelElementFacadeLogic(ModelElement metaObjectIn, String context)
48 {
49 super(metaObjectIn, getContext(context));
50 this.metaObject = metaObjectIn;
51 }
52
53
54
55
56 private static final Logger logger = Logger.getLogger(ModelElementFacadeLogic.class);
57
58
59
60
61
62
63 private static String getContext(String context)
64 {
65 if (context == null)
66 {
67 context = "org.andromda.metafacades.uml.ModelElementFacade";
68 }
69 return context;
70 }
71
72
73
74
75 @Override
76 public void resetMetafacadeContext(String context)
77 {
78 if (!this.contextRoot)
79 {
80 context = getContext(context);
81 setMetafacadeContext (context);
82 }
83 }
84
85
86
87
88
89 public boolean isModelElementFacadeMetaType()
90 {
91 return true;
92 }
93
94
95
96
97
98
99
100 protected abstract String handleGetVisibility();
101
102 private String __visibility1a;
103 private boolean __visibility1aSet = false;
104
105
106
107
108
109
110 public final String getVisibility()
111 {
112 String visibility1a = this.__visibility1a;
113 if (!this.__visibility1aSet)
114 {
115
116 visibility1a = handleGetVisibility();
117
118 this.__visibility1a = visibility1a;
119 if (isMetafacadePropertyCachingEnabled())
120 {
121 this.__visibility1aSet = true;
122 }
123 }
124 return visibility1a;
125 }
126
127
128
129
130
131 protected abstract String handleGetPackagePath();
132
133 private String __packagePath2a;
134 private boolean __packagePath2aSet = false;
135
136
137
138
139
140 public final String getPackagePath()
141 {
142 String packagePath2a = this.__packagePath2a;
143 if (!this.__packagePath2aSet)
144 {
145
146 packagePath2a = handleGetPackagePath();
147
148 this.__packagePath2a = packagePath2a;
149 if (isMetafacadePropertyCachingEnabled())
150 {
151 this.__packagePath2aSet = true;
152 }
153 }
154 return packagePath2a;
155 }
156
157
158
159
160
161 protected abstract String handleGetName();
162
163 private String __name3a;
164 private boolean __name3aSet = false;
165
166
167
168
169
170 public final String getName()
171 {
172 String name3a = this.__name3a;
173 if (!this.__name3aSet)
174 {
175
176 name3a = handleGetName();
177
178 this.__name3a = name3a;
179 if (isMetafacadePropertyCachingEnabled())
180 {
181 this.__name3aSet = true;
182 }
183 }
184 return name3a;
185 }
186
187
188
189
190
191 protected abstract String handleGetPackageName();
192
193 private String __packageName4a;
194 private boolean __packageName4aSet = false;
195
196
197
198
199
200 public final String getPackageName()
201 {
202 String packageName4a = this.__packageName4a;
203 if (!this.__packageName4aSet)
204 {
205
206 packageName4a = handleGetPackageName();
207
208 this.__packageName4a = packageName4a;
209 if (isMetafacadePropertyCachingEnabled())
210 {
211 this.__packageName4aSet = true;
212 }
213 }
214 return packageName4a;
215 }
216
217
218
219
220
221 protected abstract String handleGetFullyQualifiedName();
222
223 private String __fullyQualifiedName5a;
224 private boolean __fullyQualifiedName5aSet = false;
225
226
227
228
229
230 public final String getFullyQualifiedName()
231 {
232 String fullyQualifiedName5a = this.__fullyQualifiedName5a;
233 if (!this.__fullyQualifiedName5aSet)
234 {
235
236 fullyQualifiedName5a = handleGetFullyQualifiedName();
237
238 this.__fullyQualifiedName5a = fullyQualifiedName5a;
239 if (isMetafacadePropertyCachingEnabled())
240 {
241 this.__fullyQualifiedName5aSet = true;
242 }
243 }
244 return fullyQualifiedName5a;
245 }
246
247
248
249
250
251 protected abstract String handleGetFullyQualifiedNamePath();
252
253 private String __fullyQualifiedNamePath6a;
254 private boolean __fullyQualifiedNamePath6aSet = false;
255
256
257
258
259
260
261 public final String getFullyQualifiedNamePath()
262 {
263 String fullyQualifiedNamePath6a = this.__fullyQualifiedNamePath6a;
264 if (!this.__fullyQualifiedNamePath6aSet)
265 {
266
267 fullyQualifiedNamePath6a = handleGetFullyQualifiedNamePath();
268
269 this.__fullyQualifiedNamePath6a = fullyQualifiedNamePath6a;
270 if (isMetafacadePropertyCachingEnabled())
271 {
272 this.__fullyQualifiedNamePath6aSet = true;
273 }
274 }
275 return fullyQualifiedNamePath6a;
276 }
277
278
279
280
281
282 protected abstract TypeMappings handleGetLanguageMappings();
283
284 private TypeMappings __languageMappings7a;
285 private boolean __languageMappings7aSet = false;
286
287
288
289
290
291 public final TypeMappings getLanguageMappings()
292 {
293 TypeMappings languageMappings7a = this.__languageMappings7a;
294 if (!this.__languageMappings7aSet)
295 {
296
297 languageMappings7a = handleGetLanguageMappings();
298
299 this.__languageMappings7a = languageMappings7a;
300 if (isMetafacadePropertyCachingEnabled())
301 {
302 this.__languageMappings7aSet = true;
303 }
304 }
305 return languageMappings7a;
306 }
307
308
309
310
311
312 protected abstract Collection<String> handleGetStereotypeNames();
313
314 private Collection<String> __stereotypeNames8a;
315 private boolean __stereotypeNames8aSet = false;
316
317
318
319
320
321 public final Collection<String> getStereotypeNames()
322 {
323 Collection<String> stereotypeNames8a = this.__stereotypeNames8a;
324 if (!this.__stereotypeNames8aSet)
325 {
326
327 stereotypeNames8a = handleGetStereotypeNames();
328
329 this.__stereotypeNames8a = stereotypeNames8a;
330 if (isMetafacadePropertyCachingEnabled())
331 {
332 this.__stereotypeNames8aSet = true;
333 }
334 }
335 return stereotypeNames8a;
336 }
337
338
339
340
341
342 protected abstract String handleGetId();
343
344 private String __id9a;
345 private boolean __id9aSet = false;
346
347
348
349
350
351 public final String getId()
352 {
353 String id9a = this.__id9a;
354 if (!this.__id9aSet)
355 {
356
357 id9a = handleGetId();
358
359 this.__id9a = id9a;
360 if (isMetafacadePropertyCachingEnabled())
361 {
362 this.__id9aSet = true;
363 }
364 }
365 return id9a;
366 }
367
368
369
370
371
372 protected abstract boolean handleIsConstraintsPresent();
373
374 private boolean __constraintsPresent10a;
375 private boolean __constraintsPresent10aSet = false;
376
377
378
379
380
381 public final boolean isConstraintsPresent()
382 {
383 boolean constraintsPresent10a = this.__constraintsPresent10a;
384 if (!this.__constraintsPresent10aSet)
385 {
386
387 constraintsPresent10a = handleIsConstraintsPresent();
388
389 this.__constraintsPresent10a = constraintsPresent10a;
390 if (isMetafacadePropertyCachingEnabled())
391 {
392 this.__constraintsPresent10aSet = true;
393 }
394 }
395 return constraintsPresent10a;
396 }
397
398
399
400
401
402 protected abstract boolean handleIsBindingDependenciesPresent();
403
404 private boolean __bindingDependenciesPresent11a;
405 private boolean __bindingDependenciesPresent11aSet = false;
406
407
408
409
410
411
412 public final boolean isBindingDependenciesPresent()
413 {
414 boolean bindingDependenciesPresent11a = this.__bindingDependenciesPresent11a;
415 if (!this.__bindingDependenciesPresent11aSet)
416 {
417
418 bindingDependenciesPresent11a = handleIsBindingDependenciesPresent();
419
420 this.__bindingDependenciesPresent11a = bindingDependenciesPresent11a;
421 if (isMetafacadePropertyCachingEnabled())
422 {
423 this.__bindingDependenciesPresent11aSet = true;
424 }
425 }
426 return bindingDependenciesPresent11a;
427 }
428
429
430
431
432
433 protected abstract boolean handleIsTemplateParametersPresent();
434
435 private boolean __templateParametersPresent12a;
436 private boolean __templateParametersPresent12aSet = false;
437
438
439
440
441
442
443 public final boolean isTemplateParametersPresent()
444 {
445 boolean templateParametersPresent12a = this.__templateParametersPresent12a;
446 if (!this.__templateParametersPresent12aSet)
447 {
448
449 templateParametersPresent12a = handleIsTemplateParametersPresent();
450
451 this.__templateParametersPresent12a = templateParametersPresent12a;
452 if (isMetafacadePropertyCachingEnabled())
453 {
454 this.__templateParametersPresent12aSet = true;
455 }
456 }
457 return templateParametersPresent12a;
458 }
459
460
461
462
463
464 protected abstract Collection<String> handleGetKeywords();
465
466 private Collection<String> __keywords13a;
467 private boolean __keywords13aSet = false;
468
469
470
471
472
473
474
475
476
477 public final Collection<String> getKeywords()
478 {
479 Collection<String> keywords13a = this.__keywords13a;
480 if (!this.__keywords13aSet)
481 {
482
483 keywords13a = handleGetKeywords();
484
485 this.__keywords13a = keywords13a;
486 if (isMetafacadePropertyCachingEnabled())
487 {
488 this.__keywords13aSet = true;
489 }
490 }
491 return keywords13a;
492 }
493
494
495
496
497
498 protected abstract String handleGetLabel();
499
500 private String __label14a;
501 private boolean __label14aSet = false;
502
503
504
505
506
507 public final String getLabel()
508 {
509 String label14a = this.__label14a;
510 if (!this.__label14aSet)
511 {
512
513 label14a = handleGetLabel();
514
515 this.__label14a = label14a;
516 if (isMetafacadePropertyCachingEnabled())
517 {
518 this.__label14aSet = true;
519 }
520 }
521 return label14a;
522 }
523
524
525
526
527
528 protected abstract String handleGetQualifiedName();
529
530 private String __qualifiedName15a;
531 private boolean __qualifiedName15aSet = false;
532
533
534
535
536
537
538
539
540 public final String getQualifiedName()
541 {
542 String qualifiedName15a = this.__qualifiedName15a;
543 if (!this.__qualifiedName15aSet)
544 {
545
546 qualifiedName15a = handleGetQualifiedName();
547
548 this.__qualifiedName15a = qualifiedName15a;
549 if (isMetafacadePropertyCachingEnabled())
550 {
551 this.__qualifiedName15aSet = true;
552 }
553 }
554 return qualifiedName15a;
555 }
556
557
558
559
560
561 protected abstract boolean handleIsReservedWord();
562
563 private boolean __reservedWord16a;
564 private boolean __reservedWord16aSet = false;
565
566
567
568
569
570 public final boolean isReservedWord()
571 {
572 boolean reservedWord16a = this.__reservedWord16a;
573 if (!this.__reservedWord16aSet)
574 {
575
576 reservedWord16a = handleIsReservedWord();
577
578 this.__reservedWord16a = reservedWord16a;
579 if (isMetafacadePropertyCachingEnabled())
580 {
581 this.__reservedWord16aSet = true;
582 }
583 }
584 return reservedWord16a;
585 }
586
587
588
589
590
591 protected abstract boolean handleIsDocumentationPresent();
592
593 private boolean __documentationPresent17a;
594 private boolean __documentationPresent17aSet = false;
595
596
597
598
599
600 public final boolean isDocumentationPresent()
601 {
602 boolean documentationPresent17a = this.__documentationPresent17a;
603 if (!this.__documentationPresent17aSet)
604 {
605
606 documentationPresent17a = handleIsDocumentationPresent();
607
608 this.__documentationPresent17a = documentationPresent17a;
609 if (isMetafacadePropertyCachingEnabled())
610 {
611 this.__documentationPresent17aSet = true;
612 }
613 }
614 return documentationPresent17a;
615 }
616
617
618
619
620
621 protected abstract boolean handleIsValidIdentifierName();
622
623 private boolean __validIdentifierName18a;
624 private boolean __validIdentifierName18aSet = false;
625
626
627
628
629
630
631
632 public final boolean isValidIdentifierName()
633 {
634 boolean validIdentifierName18a = this.__validIdentifierName18a;
635 if (!this.__validIdentifierName18aSet)
636 {
637
638 validIdentifierName18a = handleIsValidIdentifierName();
639
640 this.__validIdentifierName18a = validIdentifierName18a;
641 if (isMetafacadePropertyCachingEnabled())
642 {
643 this.__validIdentifierName18aSet = true;
644 }
645 }
646 return validIdentifierName18a;
647 }
648
649
650
651
652
653
654
655
656
657
658 protected abstract Object handleFindTaggedValue(String tagName);
659
660
661
662
663
664
665
666
667
668 public Object findTaggedValue(String tagName)
669 {
670
671 Object returnValue = handleFindTaggedValue(tagName);
672
673 return returnValue;
674 }
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690 protected abstract boolean handleHasStereotype(String stereotypeName);
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707 public boolean hasStereotype(String stereotypeName)
708 {
709
710 boolean returnValue = handleHasStereotype(stereotypeName);
711
712 return returnValue;
713 }
714
715
716
717
718
719
720
721
722
723 protected abstract String handleGetDocumentation(String indent);
724
725
726
727
728
729
730
731
732
733 public String getDocumentation(String indent)
734 {
735
736 String returnValue = handleGetDocumentation(indent);
737
738 return returnValue;
739 }
740
741
742
743
744
745
746
747
748
749
750 protected abstract String handleGetFullyQualifiedName(boolean modelName);
751
752
753
754
755
756
757
758
759
760
761
762 public String getFullyQualifiedName(boolean modelName)
763 {
764
765 String returnValue = handleGetFullyQualifiedName(modelName);
766
767 return returnValue;
768 }
769
770
771
772
773
774
775
776
777
778
779
780 protected abstract String handleGetDocumentation(String indent, int lineLength);
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795 public String getDocumentation(String indent, int lineLength)
796 {
797
798 String returnValue = handleGetDocumentation(indent, lineLength);
799
800 return returnValue;
801 }
802
803
804
805
806
807
808
809
810 protected abstract boolean handleHasExactStereotype(String stereotypeName);
811
812
813
814
815
816
817
818
819 public boolean hasExactStereotype(String stereotypeName)
820 {
821
822 boolean returnValue = handleHasExactStereotype(stereotypeName);
823
824 return returnValue;
825 }
826
827
828
829
830
831
832
833
834
835
836 protected abstract String handleTranslateConstraint(String name, String translation);
837
838
839
840
841
842
843
844
845
846
847
848
849 public String translateConstraint(String name, String translation)
850 {
851
852 String returnValue = handleTranslateConstraint(name, translation);
853
854 return returnValue;
855 }
856
857
858
859
860
861
862
863
864 protected abstract String[] handleTranslateConstraints(String kind, String translation);
865
866
867
868
869
870
871
872
873
874
875 public String[] translateConstraints(String kind, String translation)
876 {
877
878 String[] returnValue = handleTranslateConstraints(kind, translation);
879
880 return returnValue;
881 }
882
883
884
885
886
887
888
889 protected abstract String[] handleTranslateConstraints(String translation);
890
891
892
893
894
895
896
897
898 public String[] translateConstraints(String translation)
899 {
900
901 String[] returnValue = handleTranslateConstraints(translation);
902
903 return returnValue;
904 }
905
906
907
908
909
910
911
912
913 protected abstract Collection<ConstraintFacade> handleGetConstraints(String kind);
914
915
916
917
918
919
920
921
922
923 public Collection<ConstraintFacade> getConstraints(String kind)
924 {
925
926 Collection<ConstraintFacade> returnValue = handleGetConstraints(kind);
927
928 return returnValue;
929 }
930
931
932
933
934
935
936
937
938 protected abstract Collection<Object> handleFindTaggedValues(String tagName);
939
940
941
942
943
944
945
946
947
948 public Collection<Object> findTaggedValues(String tagName)
949 {
950
951 Collection<Object> returnValue = handleFindTaggedValues(tagName);
952
953 return returnValue;
954 }
955
956
957
958
959
960
961
962
963
964
965
966 protected abstract String handleGetDocumentation(String indent, int lineLength, boolean htmlStyle);
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983 public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
984 {
985
986 String returnValue = handleGetDocumentation(indent, lineLength, htmlStyle);
987
988 return returnValue;
989 }
990
991
992
993
994
995
996
997
998 protected abstract String handleGetPackageName(boolean modelName);
999
1000
1001
1002
1003
1004
1005
1006
1007 public String getPackageName(boolean modelName)
1008 {
1009
1010 String returnValue = handleGetPackageName(modelName);
1011
1012 return returnValue;
1013 }
1014
1015
1016
1017
1018
1019
1020 protected abstract void handleCopyTaggedValues(ModelElementFacade element);
1021
1022
1023
1024
1025
1026
1027 public void copyTaggedValues(ModelElementFacade element)
1028 {
1029
1030 handleCopyTaggedValues(element);
1031
1032 }
1033
1034
1035
1036
1037
1038
1039
1040 protected abstract Object handleGetTemplateParameter(String parameterName);
1041
1042
1043
1044
1045
1046
1047
1048
1049 public Object getTemplateParameter(String parameterName)
1050 {
1051
1052 Object returnValue = handleGetTemplateParameter(parameterName);
1053
1054 return returnValue;
1055 }
1056
1057
1058
1059
1060
1061
1062
1063
1064 protected abstract boolean handleHasKeyword(String keywordName);
1065
1066
1067
1068
1069
1070
1071
1072
1073 public boolean hasKeyword(String keywordName)
1074 {
1075
1076 boolean returnValue = handleHasKeyword(keywordName);
1077
1078 return returnValue;
1079 }
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089 protected abstract String handleGetBindedFullyQualifiedName(ModelElementFacade bindedElement);
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099 public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
1100 {
1101
1102 String returnValue = handleGetBindedFullyQualifiedName(bindedElement);
1103
1104 return returnValue;
1105 }
1106
1107
1108
1109
1110
1111
1112
1113 public final Collection<DependencyFacade> getSourceDependencies()
1114 {
1115 Collection<DependencyFacade> getSourceDependencies1r = null;
1116
1117 Collection result = handleGetSourceDependencies();
1118 List shieldedResult = this.shieldedElements(result);
1119 try
1120 {
1121 getSourceDependencies1r = (Collection<DependencyFacade>)shieldedResult;
1122 }
1123 catch (ClassCastException ex)
1124 {
1125
1126 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getSourceDependencies Collection<DependencyFacade> " + result + ": " + shieldedResult);
1127 }
1128
1129 return getSourceDependencies1r;
1130 }
1131
1132
1133
1134
1135
1136 protected abstract Collection handleGetSourceDependencies();
1137
1138
1139
1140
1141
1142 public final Collection<DependencyFacade> getTargetDependencies()
1143 {
1144 Collection<DependencyFacade> getTargetDependencies2r = null;
1145
1146 Collection result = handleGetTargetDependencies();
1147 List shieldedResult = this.shieldedElements(result);
1148 try
1149 {
1150 getTargetDependencies2r = (Collection<DependencyFacade>)shieldedResult;
1151 }
1152 catch (ClassCastException ex)
1153 {
1154
1155 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getTargetDependencies Collection<DependencyFacade> " + result + ": " + shieldedResult);
1156 }
1157
1158 return getTargetDependencies2r;
1159 }
1160
1161
1162
1163
1164
1165 protected abstract Collection handleGetTargetDependencies();
1166
1167
1168
1169
1170
1171 public final Collection<ConstraintFacade> getConstraints()
1172 {
1173 Collection<ConstraintFacade> getConstraints3r = null;
1174
1175 Collection result = handleGetConstraints();
1176 List shieldedResult = this.shieldedElements(result);
1177 try
1178 {
1179 getConstraints3r = (Collection<ConstraintFacade>)shieldedResult;
1180 }
1181 catch (ClassCastException ex)
1182 {
1183
1184 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getConstraints Collection<ConstraintFacade> " + result + ": " + shieldedResult);
1185 }
1186
1187 return getConstraints3r;
1188 }
1189
1190
1191
1192
1193
1194 protected abstract Collection handleGetConstraints();
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204 public final Collection<StereotypeFacade> getStereotypes()
1205 {
1206 Collection<StereotypeFacade> getStereotypes4r = null;
1207
1208 Collection result = handleGetStereotypes();
1209 List shieldedResult = this.shieldedElements(result);
1210 try
1211 {
1212 getStereotypes4r = (Collection<StereotypeFacade>)shieldedResult;
1213 }
1214 catch (ClassCastException ex)
1215 {
1216
1217 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getStereotypes Collection<StereotypeFacade> " + result + ": " + shieldedResult);
1218 }
1219
1220 return getStereotypes4r;
1221 }
1222
1223
1224
1225
1226
1227 protected abstract Collection handleGetStereotypes();
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237 public final ModelFacade getModel()
1238 {
1239 ModelFacade getModel5r = null;
1240
1241 Object result = handleGetModel();
1242 MetafacadeBase shieldedResult = this.shieldedElement(result);
1243 try
1244 {
1245 getModel5r = (ModelFacade)shieldedResult;
1246 }
1247 catch (ClassCastException ex)
1248 {
1249
1250 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getModel ModelFacade " + result + ": " + shieldedResult);
1251 }
1252
1253 return getModel5r;
1254 }
1255
1256
1257
1258
1259
1260 protected abstract Object handleGetModel();
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270 public final Collection<TaggedValueFacade> getTaggedValues()
1271 {
1272 Collection<TaggedValueFacade> getTaggedValues6r = null;
1273
1274 Collection result = handleGetTaggedValues();
1275 List shieldedResult = this.shieldedElements(result);
1276 try
1277 {
1278 getTaggedValues6r = (Collection<TaggedValueFacade>)shieldedResult;
1279 }
1280 catch (ClassCastException ex)
1281 {
1282
1283 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getTaggedValues Collection<TaggedValueFacade> " + result + ": " + shieldedResult);
1284 }
1285
1286 return getTaggedValues6r;
1287 }
1288
1289
1290
1291
1292
1293 protected abstract Collection handleGetTaggedValues();
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303 public final Collection<TemplateParameterFacade> getTemplateParameters()
1304 {
1305 Collection<TemplateParameterFacade> getTemplateParameters7r = null;
1306
1307 Collection result = handleGetTemplateParameters();
1308 List shieldedResult = this.shieldedElements(result);
1309 try
1310 {
1311 getTemplateParameters7r = (Collection<TemplateParameterFacade>)shieldedResult;
1312 }
1313 catch (ClassCastException ex)
1314 {
1315
1316 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getTemplateParameters Collection<TemplateParameterFacade> " + result + ": " + shieldedResult);
1317 }
1318
1319 return getTemplateParameters7r;
1320 }
1321
1322
1323
1324
1325
1326 protected abstract Collection handleGetTemplateParameters();
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336 public final ModelElementFacade getPackage()
1337 {
1338 ModelElementFacade getPackage8r = null;
1339
1340 Object result = handleGetPackage();
1341 MetafacadeBase shieldedResult = this.shieldedElement(result);
1342 try
1343 {
1344 getPackage8r = (ModelElementFacade)shieldedResult;
1345 }
1346 catch (ClassCastException ex)
1347 {
1348
1349 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getPackage ModelElementFacade " + result + ": " + shieldedResult);
1350 }
1351
1352 return getPackage8r;
1353 }
1354
1355
1356
1357
1358
1359 protected abstract Object handleGetPackage();
1360
1361
1362
1363
1364
1365 public final PackageFacade getRootPackage()
1366 {
1367 PackageFacade getRootPackage9r = null;
1368
1369 Object result = handleGetRootPackage();
1370 MetafacadeBase shieldedResult = this.shieldedElement(result);
1371 try
1372 {
1373 getRootPackage9r = (PackageFacade)shieldedResult;
1374 }
1375 catch (ClassCastException ex)
1376 {
1377
1378 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getRootPackage PackageFacade " + result + ": " + shieldedResult);
1379 }
1380
1381 return getRootPackage9r;
1382 }
1383
1384
1385
1386
1387
1388 protected abstract Object handleGetRootPackage();
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398 public final StateMachineFacade getStateMachineContext()
1399 {
1400 StateMachineFacade getStateMachineContext10r = null;
1401
1402 Object result = handleGetStateMachineContext();
1403 MetafacadeBase shieldedResult = this.shieldedElement(result);
1404 try
1405 {
1406 getStateMachineContext10r = (StateMachineFacade)shieldedResult;
1407 }
1408 catch (ClassCastException ex)
1409 {
1410
1411 ModelElementFacadeLogic.logger.warn("incorrect metafacade cast for ModelElementFacadeLogic.getStateMachineContext StateMachineFacade " + result + ": " + shieldedResult);
1412 }
1413
1414 return getStateMachineContext10r;
1415 }
1416
1417
1418
1419
1420
1421 protected abstract Object handleGetStateMachineContext();
1422
1423
1424
1425
1426
1427 @Override
1428 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
1429 {
1430 }
1431
1432
1433
1434
1435 private static final String NAME_PROPERTY = "name";
1436 private static final String FQNAME_PROPERTY = "fullyQualifiedName";
1437
1438
1439
1440
1441 @Override
1442 public String toString()
1443 {
1444 final StringBuilder toString = new StringBuilder(this.getClass().getName());
1445 toString.append("[");
1446 try
1447 {
1448 toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
1449 }
1450 catch (final Throwable tryAgain)
1451 {
1452 try
1453 {
1454 toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
1455 }
1456 catch (final Throwable ignore)
1457 {
1458
1459 }
1460 }
1461 toString.append("]");
1462 return toString.toString();
1463 }
1464 }