Results 1 to 3 of 3
  1. #1
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default [SOLVED] What is an Object graph?

    Everything I read about serialization mentions it creates an object graph to preserve sharing and circular references. I understand the idea of sharing and circular referencing but what is an object graph? Is that similar to a UML class interaction diagram? Or is it just some hashmap that shows what objects point to each other?
    Liberty has never come from the government.
    Liberty has always come from the subjects of government.
    The history of liberty is the history of resistance.
    The history of liberty is a history of the limitation of governmental power, not the increase of it.

  2. #2
    neilcoffey is offline Senior Member
    Join Date
    Nov 2008
    Posts
    286
    Rep Power
    7

    Default

    The object graph is something like a UML diagram. In fact, it's really just the graph you get when you connect up all the references from object to object. It's nothing sophisticated at all.

    The serialization writes objects in such a way that the object graph (i.e. the hierarchical and possibly circular relationships between objects) can be reconstructed. Internally, yes it actually uses a Hashtable, though that's an uninteresting detail, I think.

    (By the way, for questions like "what does X do", you know that you can just look at the JDK source code, don't you?)

  3. #3
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default

    Ya I was digging around the writeObject source code and I had the basic idea but I just needed reassurance that I understood the whole concept. Thanks for clearing that up.
    Liberty has never come from the government.
    Liberty has always come from the subjects of government.
    The history of liberty is the history of resistance.
    The history of liberty is a history of the limitation of governmental power, not the increase of it.

Similar Threads

  1. Replies: 2
    Last Post: 11-26-2010, 03:12 AM
  2. Replies: 1
    Last Post: 07-22-2008, 05:27 PM
  3. Bar Graph
    By Zosden in forum Advanced Java
    Replies: 2
    Last Post: 04-28-2008, 07:52 AM
  4. Replies: 1
    Last Post: 04-17-2008, 11:10 PM
  5. Creating object of Type Object class
    By venkatv in forum New To Java
    Replies: 3
    Last Post: 07-17-2007, 04:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •