copy of JMI extents
Holger Krug <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I need a copy operation for JMI packages. Initially I tried to go through XMI, but this does not work. E.g. if I try to copy the PrimitiveTypes packages via XMI I get a MalformedXMIException: Namespace cannot be resolved: Model Probably the new XMI API will solve this problem, but I need the functionality right now. Hence my question: Is there any copy operation already implemented which I could reuse ? I would do it for my own, but it's not a trivial task. Think about the following situation: * Class `A' with instance attribute `a' of type `AStruct' having a field (or something even more nested inside `AStruct') of type `B' * Class `B' with instance attribute `b' of type `BStruct' having a field (or something even more nested inside `BStruct') of type `A' In this situation instances of `A' and `B' may reference each other, so that when the copy is created one of them, e.g. the instance of `A', must be created first, the place where the instance of `B' has to be added later on has to be recorded, the instance of `B' has to be created and then it has to be put somewhere deep inside `AStruct'. This all is solvable, but it seems really to be an ugly programming task, so I would be happy if a solution would be already ready out there. -- Holger Krug [email protected]