Re: copy of JMI extents

Martin Matula <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
Hi Holger,
no, we don't have this functionality yet. It would be cool if you could 
implement it as a utility that anyone can reuse.
Regarding the default factory methods it is not that simple. Consider 
the case when the attribute holding the structure is readonly - then 
there is no way of setting this attribute later. However I think that 
you can forget about this complicated situation with cyclic references, 
although it currently does not break any MOF constraints (as it is not 
really a composition), for JMI it has the same consequences as if it was 
a composition so I guess that the fact that this is possible is just a 
hole in the spec and you don't have to support it in your tool.
(IMO it is not solvable without breaking semantics of structures defined 
in JMI saying that structures are immutable).
Martin

Holger Krug wrote:
> On Tue, Aug 06, 2002 at 01:25:49PM +0200, Holger Krug wrote:
> 
>>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.
> 
> 
> .. uups, how stupid, I forgot that I can use the default factory
> method and set the attributes later on. So I will give it a try. But
> if anybody has it already implemented, please tell !
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.