List of usage examples for org.apache.commons.lang ObjectUtils identityToString
public static void identityToString(StringBuffer buffer, Object object)
Appends the toString that would be produced by Object
if a class did not override toString itself.
From source file:stc.app.bean.lang.ToStringBuilder.java
/** * <p>//from ww w . j a va2 s .c o m * Appends with the same format as the default <code>Object toString() * </code> method. Appends the class name followed by * {@link System#identityHashCode(java.lang.Object)}. * </p> * * @param object the <code>Object</code> whose class name and id to output * @return this * @since 2.0 */ public ToStringBuilder appendAsObjectToString(Object object) { ObjectUtils.identityToString(this.getStringBuffer(), object); return this; }
From source file:stc.app.bean.lang.ToStringStyle.java
/** * <p>/*from w w w . ja va2s . co m*/ * Append to the <code>toString</code> an <code>Object</code> value that has been detected to * participate in a cycle. This implementation will print the standard string value of the value. * </p> * * @param buffer the <code>StringBuffer</code> to populate * @param fieldName the field name, typically not used as already appended * @param value the value to add to the <code>toString</code>, not <code>null</code> * * @since 2.2 */ protected void appendCyclicObject(StringBuffer buffer, String fieldName, Object value) { ObjectUtils.identityToString(buffer, value); }