This discussion is archived
0 Replies Latest reply: Nov 4, 2011 8:12 AM by 898122 RSS

Find Objects in the StackFrame via the ID

898122 Newbie
Currently Being Moderated
Hello everyone,

I'm looking for a way to find a variable via a valid Object ID. Here is some code of mine in a pseudo manner how I access the variables in the current frame:

List<LocalVariable> vars = frame.visibleVariables();
Map<LocalVariable, Value> values = frame.getValues(vars);
for (LocalVariable entry : vars) {
          Value val = (Value) values.get(entry);
          // val.toString() ==> "instance of abc (ID=1234)"

Now, if I parse all value objects, I can check for the ID. But how do I get a reference to a object ID which is not in the first hierarchy.
For example, the object A (ID=1234) has object B (ID=2345) as a member. If I'm looking for ID=2345, I don't find the object with the sketched algorithm.

Of course, I can iterate over all objects recursively. But in a big system, this takes forever by doing it manually.
So, is there a builtin method/way to get a object reference or absolute object name ( like ID=6432 yields objA.objB.objC) only by using a known Object ID?

Kind Regards,


  • Correct Answers - 10 points
  • Helpful Answers - 5 points