/* returns a string consisting of formatted member names and values */
public Object lookupMembers(Object o) throws NoSuchVariableException
{
Variable var = null;
Value val = null;
Variable[] mems = null;
try
{
var = resolveToVariable(o);
if (var != null)
val = var.getValue();
else
val = resolveToValue(o);
mems = val.getMembers(getSession());
}
catch(NullPointerException npe)
{
throw new NoSuchVariableException(o);
}
catch(PlayerDebugException pde)
{
throw new NoSuchVariableException(o); // not quite right...
}
StringBuilder sb = new StringBuilder();
if (var != null)
ExpressionCache.appendVariable(sb, var);
else
ExpressionCache.appendVariableValue(sb, val);
boolean attrs = m_cache.propertyEnabled(DebugCLI.DISPLAY_ATTRIBUTES);
if (attrs && var != null)
ExpressionCache.appendVariableAttributes(sb, var);
// [mmorearty] experimenting with hierarchical display of members
String[] classHierarchy = val.getClassHierarchy(false);
if (classHierarchy != null && getSession().getPreference(SessionManager.PREF_HIERARCHICAL_VARIABLES) != 0)
{
for (int c=0; c<classHierarchy.length; ++c)
{
String classname = classHierarchy[c];