API for manipulating UML Profiled [message #627285] |
Tue, 16 December 2008 17:07 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
Hi
i'm going, for my work, to work on uml profile.
And i notice that it's not very fun to always doing
myElement.getValue('stereotype'...)
i wanted to know if it exists a plugin which transform a profile to an
API permitting to manipulate them as model instantiation
if it doesn't exist i post here what i imagine and tell me what do you
think about
- a user defines a profile
- Profile p
- Stereotype s based on Class
- property p1 : String
- Stereotype s2 based on Association
- it triggers an action generating an eclipse plugin
- the api could be like this
+ package profile /* or name providing by user */
+ Class S extends Class
Attribute Class classConcerneed
Constructor S (Class c)
Method getP1 () returns String
// All the methods overriden of class are delegated to classConcerned
or a method getConcernedClass and no inheritance to Class, i like the
solution with delegation it could permit to manipulate the object as a
class
+ Class S2 extends Association
Attribute Association associationConcerned
Constructor S2 (Association a)
...
- the user uses the api
Class myClass ; ....
if (myClass.isStereotypeApplied(...)) {
S myClassStereotyped = new S (myClass) ;
...
}
|
|
|
Powered by
FUDForum. Page generated in 0.03091 seconds