I assume you just want to find a specific value and to trace its source. And all this, you want to do at debug time. I would suggest two options.
Option1
Use JSON - Serialize the object to json string and do a manual text search on the result. You would neeed json.jar (or any other parser) for this.
try {
System.out.println(new JSONObject(new YourHugeObject()).toString(5));
} catch (JSONException e) {
log(e);
}
Which will produce something like this. (I have simulated this by creating an object with some nested fields,lists,maps)
{
"ct": {
"a": 1,
"b": "sdf",
"f": 12,
"nested": {
"key1": {
"kk": "kk",
"ssdf": 123
},
"onemorekey": {
"kk": "kk",
"ssdf": 123
}
}
},
"doubleProp": 12.2,
"lngprop": 1232323,
"strProp": "123",
"stringlist": [
"String1",
"String2",
"String3"
]
}
Option2
Convert/Serialize the object to XML. Use XStream for this,which will be the easiest of all available parsers. With just two lines of code,
XStream stream = new XStream();
System.out.println(stream.toXML(new YourHugeObject()));
Which will produce,
<com.kmg.jsontools.test.JSTest>
<stringlist>
<string>String1</string>
<string>String2</string>
<string>String3</string>
</stringlist>
<strProp>123</strProp>
<doubleProp>12.2</doubleProp>
<lngprop>1232323</lngprop>
<ct>
<a>1</a>
<b>sdf</b>
<f>12.0</f>
<nested>
<entry>
<string>key1</string>
<com.kmg.jsontools.test.Type1>
<kk>kk</kk>
<ssdf>123</ssdf>
</com.kmg.jsontools.test.Type1>
</entry>
<entry>
<string>onemorekey</string>
<com.kmg.jsontools.test.Type1>
<kk>kk</kk>
<ssdf>123</ssdf>
</com.kmg.jsontools.test.Type1>
</entry>
</nested>
</ct>
</com.kmg.jsontools.test.JSTest>
Either of the above approaches,you can either print the result to the console or to a file and inspect it manually.
Alternatively you can also use reflection,in which case you would have to write a lot of code and significant amount of time in testing it as well.