Bob explained a likely cause of code generation not matching your expected
results.  In answer to your other question:

> when I draw an aggregation between 2 classes, the code 
> generation places a variable in the 1st class. That variable 
> doesn't compare in the attribute list of the class. Why?

The fields (or variables) for the generated class will be the union of the
modeled attributes plus representations of your modeled associations.

> Can I choose the name of that variabile?

Yes, the name of the AssociationEnd for the far end of the aggregation will
be used as the name of the variable during code generation.  So for a
diagram like this

                theB
    A <>------------- B

the variable in class A will be named "theB" instead of the default "myB".

Other attributes of the AssociationEnd will control other parts of the code
generation.  If you make that end non-navigable, no variable will be
generated.  If you make the multiplicity greater than 1, it will be
generated as an array or list instead of a simple object.

By the way, ArgoUML's code generation is pretty simple.  If you're trying to
do anything fancy, it would be worth checking out something like AndroMDA or
another code generation framework that accepts UML as input.  ArgoUML's code
is good enough to use as a starting point though, or to understand how UML
maps to Java.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to