--- "Naik, Vikram" <[EMAIL PROTECTED]> wrote: > Hello, > > We have a requirement of generating plain java > objects. The element modelled can be a class, > abstract class or an interface which are stereotyped > as <<POJO>>. Now when an element modelled as > interface I am not able to find a API which would > indicate that the element is Interface and not > Class. We are generating all the plain java objects > using one stereotype. The current work around we > have is we tag the element if its an Interface. > > So I ask , is there any API available which can > indicate this difference of modeled API ? > > When we model an element as interface does the > androMDA api instantiates a different meta-class > then it does for a class. In that case I can use " > instanceof " operator to know the difference.
AndroMDA instantiates a ClassifierFacade for org.omg.uml.foundation.core.UmlClass, org.omg.uml.foundation.core.Interface and org.omg.uml.foundation.core.DataType. I'll add an isInterfaceType() for you on the ClassifierFacade. > > -Vikram. > > > -----Original Message----- > From: Chad Brandon [mailto:[EMAIL PROTECTED] > Sent: Wed 8/18/2004 2:53 PM > To: Naik, Vikram; > [EMAIL PROTECTED] > Cc: > Subject: Re: [Andromda-user] UML API for checking > modeled element is Interface. > > > > > --- "Naik, Vikram" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > How do we recognize, that a modelled element is > of > > type interface or class? > > Simplest way would be to stereotype them. But say > we > > have a requirement of having both the types under > > one stereotype <<POJO>>. I am not able to find > any > > uml API support like isInterface() etc... > > Why would you want to model both the class and the > interface? Why don't you just generate both from > the > single modeled element stereotyped as <<POJO>>? If > you're modeling both the class and interface then I > would say you're getting a little too > implementation > specific. You shouldn't care whether or not the > modeled element is a class or interface because it > doesn't really provide any value. > > > > > Please comment. > > > > Regards, > > Vikram Naik. > > > HS^µéšŠX¬²š'²ŠÞu¼’†Šxµç!r‰‹£¬¶šâqê'V§Ç‰tÒ™¢xœ > > PÑã讉åËouÓJdJ‰âp5Cù讉åË}Òj÷¹Ò‡ßEëZŠZ'"y¢w«·žJ©¦)àjwE熉ûa¶Úÿ > 0²)âל…Ê&ÿ?ÈžHÞ´&«¶¸ë?÷]<[EMAIL PROTECTED](º·~ŠàzwþX¬¶ÏåŠËbú?jwk¢gZºÇ« > > > > ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user
