You've pretty much described how to solve your problem on your own.

If you add a stereotype to an attribute, exactly the way you have decribed
below, and add that stereotype to your cartridge.xml file, then all the code
templates that have been bound to the stereotype will be invoke for every
element in your model that has been annotated with the stereotype.

It does not matter if the model element that has been annotated by the
stereotype is an attribute, class, interface, association or package.  All
model elements are equally important in AndroMDA.  The UML class model
element is no more important, and is not treated any differently, than any
other type of model element.  It just happens to be the case that most of
the current cartridges do code generation from classes.

I hope that answered you question.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Barbero
> Fabrizio
> Sent: Tuesday, October 14, 2003 11:11 AM
> To: [EMAIL PROTECTED]
> Subject: [Andromda-user] Generating more than 1 classes base on
> stereotypes of attribute
>
>
> I try to use andromda for custom generation.
> Is there a way to generate more than one class based on the
> stereotype assigned to the classattributes ?
> For instance suppose that we have a class in the model with the
> following attributes + stereotypes
>
> class: XXX
> attributes:
> <<stereotypeOne>> name: String
> <<stereotypeTwo>> age: int
> <<stereotypeTree>> quantity: float
>
> How can I design a cartriage that, giving the class XXX,
> generates 3 java classes ( in 3 different files ) depending on
> the stereotypes of the attributes ( for instance 3 files
> NameOne.java , class AgeTwo.java, class QuantityTree.java ?
>
> Thanx
> Fabrizio
>
>
>
> ---------------------------------------------
> Fabrizio Barbero - Ds Data Systems
> e-mail: <[EMAIL PROTECTED]>
> website: <http://www.dsdata.it/>
>
> Via Ugozzolo 121/A 43100 PARMA
> Tel. +39 - 0521-2781, Fax +39 - 0521-278311
> Corso Svizzera, 185 bis 10149 - TORINO
> Tel. +39 - 011.7410128, Fax +39 - 011.7410795
> ---------------------------------------------
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> Andromda-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/andromda-user



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to