Issue 16167: Handling of Java enums (kdm-rtf) Source: Benchmark Consulting (Mr. Alain Picard, apicard(at)benchmarkconsulting.com) Nature: Uncategorized Issue Severity: Summary: We found a bug in our Java KDM implementation, but after review it sneak in because of the fact that Java enum are special classes and thus can have their own methods. In 12.10 the KDM defines EnumeratedType which subsets the ownerElement relation to the value relation against Value. In 12.15, ClassUnit subsets that relation to codeElement against CodeItem, allowing MethodUnit children among other things. So, how would you represent a Java enum, as an EnumeratedType but then what do you do with the Methods defined in the enum, or as a ClassUnit and then what do you do with the Values. Or can we define the Java enum as a ClassUnit that will contain the class behavior of the enum, with an HasType relation to an EnumaratedType instance that will hold the value and the representation of the enum portion? Thanks for your insight in clarifying this situation. Resolution: Revised Text: Actions taken: May 5, 2011: received issue Discussion: End of Annotations:===== te: Thu, 5 May 2011 20:47:46 -0400 Subject: Handling of Java enums From: Alain Picard To: Nikolai Mansourov , kdm-rtf@omg.org Nik, We found a bug in our Java KDM implementation, but after review it sneak in because of the fact that Java enum are special classes and thus can have their own methods. In 12.10 the KDM defines EnumeratedType which subsets the ownerElement relation to the value relation against Value. In 12.15, ClassUnit subsets that relation to codeElement against CodeItem, allowing MethodUnit children among other things. So, how would you represent a Java enum, as an EnumeratedType but then what do you do with the Methods defined in the enum, or as a ClassUnit and then what do you do with the Values. Or can we define the Java enum as a ClassUnit that will contain the class behavior of the enum, with an HasType relation to an EnumaratedType instance that will hold the value and the representation of the enum portion? Thanks for your insight in clarifying this situation. Cheers, Alain Alain Picard Chief Strategy Officer Benchmark Consulting 813-787-3424 apicard@benchmarkconsulting.com www.benchmarkconsulting.com