@@ -0,0 +1,1697 @@
+/*%0A * fb-contrib - Auxiliary detectors for Java programs%0A * Copyright (C) 2005-2014 Dave Brosius%0A * %0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A * %0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A * %0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA%0A */%0Apackage com.mebigfatguy.fbcontrib.utils;%0A%0Aimport java.lang.reflect.Field;%0Aimport java.util.Arrays;%0A%0A/**%0A * an automatic toString() builder using reflection%0A */%0Apublic class ToString %7B%0A%0A%09private ToString() %7B%0A%09%7D%0A%09%0A%09public static String build(Object o) %7B%0A%09%09StringBuilder sb = new StringBuilder(100);%0A%09%09Class%3C?%3E cls = o.getClass();%0A%09%09sb.append(cls.getSimpleName()).append('%5B');%0A%09%09%0A%09%09try %7B%0A%09%09%09String sep = %22%22;%0A%09%09%09for (Field f : cls.getDeclaredFields()) %7B%0A%09%09%09%09sb.append(sep);%0A%09%09%09%09sep = %22, %22;%0A%09%09%09%09sb.append(f.getName()).append('=');%0A%09%09%09%09f.setAccessible(true);%0A%09%09%09%09Object value = f.get(o);%0A%09%09%09%09if (value == null) %7B%0A%09%09%09%09%09sb.append(%22null%22);%0A%09%09%09%09%7D else if (value.getClass().isArray()) %7B%0A%09%09%09%09%09sb.append(Arrays.toString((Object%5B%5D) value));%0A%09%09%09%09%7D else %7B%0A%09%09%09%09%09sb.append(value);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D catch (Exception e) %7B%0A%09%09%7D%0A%09%09%0A%09%09sb.append('%5D');%0A%09%09return sb.toString();%0A%09%7D%0A%7D%0A

add new ToString file