You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Peter B. West" <pb...@powerup.com.au> on 2002/03/13 02:44:41 UTC

Serialization

Dear Fops,

I'm naïve about serialization (among other things.)  Can anyone tell me 
whether it is possible to serialize an instance of an inner class 
without implicitly serializing the containing class instance?

Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Serialization

Posted by "Peter B. West" <pb...@powerup.com.au>.
Keiron,

Thanks.  I thought that would be the case.  I'm looking at serializing a 
subtree and replacing it with a node that says where it can be found 
again.  At the moment my Tree class has Node as an inner class.  I'll 
have to pull them apart again.

Peter

Keiron Liddle wrote:

> Hi Peter,
>
> An inner class is actually a separate class that contains a reference 
> to the containing class.
> When the class is serialized it will serialize that reference (since I 
> presume it is not transient).
> If the class is static then it will not have a rreference to the 
> containing class but that may not be suitable for other reasons.
>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Serialization

Posted by Keiron Liddle <ke...@aftexsw.com>.
Hi Peter,

An inner class is actually a separate class that contains a reference to 
the containing class.
When the class is serialized it will serialize that reference (since I 
presume it is not transient).
If the class is static then it will not have a rreference to the 
containing class but that may not be suitable for other reasons.

On 2002.03.13 02:44 Peter B. West wrote:
> Dear Fops,
> 
> I'm naïve about serialization (among other things.)  Can anyone tell me 
> whether it is possible to serialize an instance of an inner class 
> without implicitly serializing the containing class instance?
> 
> Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org