/** * @param object * @param includeInheritedFieldDepth * @return A string representation of the specified object, consisting of its class name, properties, and property values. */ public static String toString( Object object, int includeInheritedFieldDepth ) { StringBuffer text = new StringBuffer(); addObjectString(object, includeInheritedFieldDepth, object.getClass(), text); return text.toString(); }
/** * @param object An object. * @return The non-package-qualified name of the class of the specified object. Note, inner class names will still be * qualified by their enclosing class names and a "$" delimiter. */ public static String nonPackageQualifiedName( final Object object ) { // if (object == null) { // throw new IllegalArgumentException(I18n.format(CommonI18n.mustNotBeNull, "Object")); // } return nonPackageQualifiedName(object.getClass()); }
text.append(nonPackageQualifiedName(clazz)); makeAccessible(fld); Object val = fld.get(object); separatorNeeded = addSeparator(separatorNeeded, text); separatorNeeded = addSeparator(separatorNeeded, text); addObjectString(object, includeInheritedFieldDepth - 1, clazz.getSuperclass(), text);
if (!ClassUtil.isFullyQualifiedClassname(classname)) { throw new IllegalArgumentException(CommonI18n.componentClassnameNotValid.text(classname, name));
ClassUtil.makeAccessible(fld);