Traverse on object references

Hey,

I want to traverse on the object references and on their references...

I know the bfs/dfs algorithm for traverse on a graph.

My problem is how to implement it in Java.

How to know what are the references (i think reflection is too much complicated here)

I need to implement it in order to have the ability to create diff engine that compare two objects including their references.

Can some one recommends on utility, design pattern, articles協or this?

Thank you

[514 byte] By [AvihaiMara] at [2007-11-27 4:05:09]
# 1
> ...> I need to implement it in order to have the ability> to create diff engine that compare two objects> including their references.What is a "diff engine"? Could you explain your problem in a bit more detail?
prometheuzza at 2007-7-12 9:10:06 > top of Java-index,Java Essentials,Java Programming...
# 2
A diff engine get two object and walk on the objects and their references, compare them and retrun a list of diferents between the objects graph.The problem is how to walk on the object graph (the object and his references )Thank you
AvihaiMara at 2007-7-12 9:10:06 > top of Java-index,Java Essentials,Java Programming...
# 3
By "object" do you mean an instance of any class or of a specific class that you control?If you mean the first one, then you will need reflection.If you mean the second one, just add a method that returns a list or something that contains the references to other objects.
jsalonena at 2007-7-12 9:10:06 > top of Java-index,Java Essentials,Java Programming...