/** * Prettifies the representation of an Object as a String. * <ul> * <li>Simple types are simply toString'ed.</li> * <li>XML strings are formatted with line feeds and indentations.</li> * <li>Complex types report their class names.</li> * <li>Collections, Maps and native Arrays also report their size/length.</li> * </ul> * @return A prettified version of an Object as a String. */ public String prettify(Object o) { try { trace = new ObjectTrace(); internalPrettify(o); return trace.toString(); } catch (Throwable t) { return trace.toString(); } finally { trace = null; } }
/** * Prettifies the representation of an Object as a String. * <ul> * <li>Simple types are simply toString'ed.</li> * <li>XML strings are formatted with line feeds and indentations.</li> * <li>Complex types report their class names.</li> * <li>Collections, Maps and native Arrays also report their size/length.</li> * </ul> * @return A prettified version of an Object as a String. */ public String prettify(Object o) { try { trace = new ObjectTrace(); internalPrettify(o); return trace.toString(); } catch (Throwable t) { return trace.toString(); } finally { trace = null; } }
/** * Prettifies the representation of an Object as a String. * <ul> * <li>Simple types are simply toString'ed.</li> * <li>XML strings are formatted with line feeds and indentations.</li> * <li>Complex types report their class names.</li> * <li>Collections, Maps and native Arrays also report their size/length.</li> * </ul> * @return A prettified version of an Object as a String. */ public String prettify(Object o) { try { trace = new ObjectTrace(); internalPrettify(o); return trace.toString(); } catch (Throwable t) { return trace.toString(); } finally { trace = null; } }