🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #547

Re: TreeMap serialization

#547
From: George
Date: Tue, 03 Jun 2003 15:49
34 lines
2051 bytes
Hmmm....I find that what Class.getDeclaredFields () returns does not include
inherited fields.

"George" <geo54321@hotmail.com> wrote in message
news:3edcc0f4$1@newsgroups.borland.com...
> By reflection, I find that java.util.TreeMap has the following fields
>
> 0     comparator             java.util.Comparator
> 1     root                        java.util.TreeMap$Entry      transient
> 2     size                         int
> transient
> 3     modCount               int
> transient
> 4     entrySet                  java.util.Set
> transient
> 5     RED                       boolean
final
> static
> 6     BLACK                 boolean                                final
> static
> 7     serialVersionUID    long                                    final
> static
>
> Except for the comparator field (field 0), everything else is either
> transient or static (which as I understand are modifiers ignored by
> serialization).  So how does serialization work?
>
> I ask because I am trying to write a class to store the contents of a
given
> object in XML and I'm not getting any data to store for TreeMaps.
>
> TIA.
>
>
Technical Details
Message-ID: <3edcc382$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3edcc0f4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,d5d05c76cc28ee2b
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-06-03 08:56:36 PST
From: "George" <geo54321@hotmail.com>
Newsgroups: borland.public.jbuilder.java.api
References: <3edcc0f4$1@newsgroups.borland.com>
Subject: Re: TreeMap serialization
Date: Tue, 3 Jun 2003 11:49:03 -0400
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 65.209.76.133
Message-ID: <3edcc382$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054655362 65.209.76.133 (3 Jun 2003 08:49:22 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail