[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.mdt.uml2.uml] Questions about code generation rules in uml2

Hi,

I am trying to reverse engineer associations from the uml2's implementation (based on UML2.0 spec. and uml2_1.1.1). I would like to know the generation rules for its code:

1. in what situation a field is (or is not) generated for a navigable association end in the implementation class? For example, a field Classifier#generalization is generated for the association from Classifier to Generalization (pp.26), but not for the association from ActivityGroup to ActivityNode (pp.288)

2. in what situation, a createRoleName() is generated (e.g., Classifier#createGeneralization())?

3. is it true that only when the type of an association end is a subclass of NamedElement, is a method getRoleName(String name) generated (e.g., Classifier#getRedefinedClassifier(String name))?

4. how are association ends subsetting other ends specially handled in the generated code? (e.g., what kind of code will be generated if an association end subsets another end)

5. how are association ends redefining other ends specially handled in the generated code?

I checked the book "EMF Modeling Framework" and could not find all the corresponding rules to generate the uml2_1.1.1's code. For example, it only says that a field won't be generated for a volatile or non-changeable reference? It says nothing about the handling for subsetting or redefinition...

Your help is much appreciated,

-- Sunny