×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: John Wen
Added: Apr 14, 2017 5:06 PM
Views: 18
Tags: no tags
  1. import org.apache.commons.lang3.builder.ToStringBuilder;
  2. import org.apache.commons.lang3.builder.ToStringStyle;
  3.  
  4.  
  5. /**
  6.  * 打印Java Object
  7.  * @param obj
  8.  * @return
  9.  */
  10. private String toString(Object obj) {
  11.        return ToStringBuilder.reflectionToString(obj, ToStringStyle.SHORT_PREFIX_STYLE);
  12. }
  13.