private static String getNiceClassName(Class<?> clazz) { if (clazz == null) { return "unknown class"; } else if (clazz.isArray()) { return "(array of " + getNiceClassName(clazz.getComponentType()) + ")"; } else if (clazz.isEnum() && clazz.getSuperclass() != Enum.class) { return getNiceClassName(clazz.getSuperclass()); } else { return clazz.getName(); } }
/** * Add information about an incomplete object which was being unmarshalled. * * @param t the throwable to update * @param targetClass the class of the target object being unmarshalled */ public static void addIncompleteObjectInformation(Throwable t, Class<?> targetClass) { addIncompleteObjectInformation(t, getNiceClassName(targetClass)); }
/** * Add information about an object which was being (un-)marshalled. * * @param t the throwable to update * @param targetObject the target object which was being (un-)marshalled */ public static void addObjectInformation(Throwable t, Object targetObject) { final TraceInformation ti = getOrAddTraceInformation(t); final String targetClassName = getNiceClassName(targetObject.getClass()); int targetHashCode = 0; try { targetHashCode = targetObject.hashCode(); } catch (Throwable ignored) { // guess we won't know the hash code! } final Info oldInfo = ti.info; ti.info = new ObjectInfo(oldInfo, targetClassName, targetHashCode); }
private static String getNiceClassName(Class<?> clazz) { if (clazz == null) { return "unknown class"; } else if (clazz.isArray()) { return "(array of " + getNiceClassName(clazz.getComponentType()) + ")"; } else if (clazz.isEnum() && clazz.getSuperclass() != Enum.class) { return getNiceClassName(clazz.getSuperclass()); } else { return clazz.getName(); } }
private static String getNiceClassName(Class<?> clazz) { if (clazz == null) { return "unknown class"; } else if (clazz.isArray()) { return "(array of " + getNiceClassName(clazz.getComponentType()) + ")"; } else if (clazz.isEnum() && clazz.getSuperclass() != Enum.class) { return getNiceClassName(clazz.getSuperclass()); } else { return clazz.getName(); } }
private static String getNiceClassName(Class<?> clazz) { if (clazz == null) { return "unknown class"; } else if (clazz.isArray()) { return "(array of " + getNiceClassName(clazz.getComponentType()) + ")"; } else if (clazz.isEnum() && clazz.getSuperclass() != Enum.class) { return getNiceClassName(clazz.getSuperclass()); } else { return clazz.getName(); } }
private static String getNiceClassName(Class<?> clazz) { if (clazz == null) { return "unknown class"; } else if (clazz.isArray()) { return "(array of " + getNiceClassName(clazz.getComponentType()) + ")"; } else if (clazz.isEnum() && clazz.getSuperclass() != Enum.class) { return getNiceClassName(clazz.getSuperclass()); } else { return clazz.getName(); } }
private static String getNiceClassName(Class<?> clazz) { if (clazz == null) { return "unknown class"; } else if (clazz.isArray()) { return "(array of " + getNiceClassName(clazz.getComponentType()) + ")"; } else if (clazz.isEnum() && clazz.getSuperclass() != Enum.class) { return getNiceClassName(clazz.getSuperclass()); } else { return clazz.getName(); } }
/** * Add information about an incomplete object which was being unmarshalled. * * @param t the throwable to update * @param targetClass the class of the target object being unmarshalled */ public static void addIncompleteObjectInformation(Throwable t, Class<?> targetClass) { addIncompleteObjectInformation(t, getNiceClassName(targetClass)); }
/** * Add information about an incomplete object which was being unmarshalled. * * @param t the throwable to update * @param targetClass the class of the target object being unmarshalled */ public static void addIncompleteObjectInformation(Throwable t, Class<?> targetClass) { addIncompleteObjectInformation(t, getNiceClassName(targetClass)); }
/** * Add information about an incomplete object which was being unmarshalled. * * @param t the throwable to update * @param targetClass the class of the target object being unmarshalled */ public static void addIncompleteObjectInformation(Throwable t, Class<?> targetClass) { addIncompleteObjectInformation(t, getNiceClassName(targetClass)); }
/** * Add information about an incomplete object which was being unmarshalled. * * @param t the throwable to update * @param targetClass the class of the target object being unmarshalled */ public static void addIncompleteObjectInformation(Throwable t, Class<?> targetClass) { addIncompleteObjectInformation(t, getNiceClassName(targetClass)); }
/** * Add information about an incomplete object which was being unmarshalled. * * @param t the throwable to update * @param targetClass the class of the target object being unmarshalled */ public static void addIncompleteObjectInformation(Throwable t, Class<?> targetClass) { addIncompleteObjectInformation(t, getNiceClassName(targetClass)); }
/** * Add information about an object which was being (un-)marshalled. * * @param t the throwable to update * @param targetObject the target object which was being (un-)marshalled */ public static void addObjectInformation(Throwable t, Object targetObject) { final TraceInformation ti = getOrAddTraceInformation(t); final String targetClassName = getNiceClassName(targetObject.getClass()); int targetHashCode = 0; try { targetHashCode = targetObject.hashCode(); } catch (Throwable ignored) { // guess we won't know the hash code! } final Info oldInfo = ti.info; ti.info = new ObjectInfo(oldInfo, targetClassName, targetHashCode); }
/** * Add information about an object which was being (un-)marshalled. * * @param t the throwable to update * @param targetObject the target object which was being (un-)marshalled */ public static void addObjectInformation(Throwable t, Object targetObject) { final TraceInformation ti = getOrAddTraceInformation(t); final String targetClassName = getNiceClassName(targetObject.getClass()); int targetHashCode = 0; try { targetHashCode = targetObject.hashCode(); } catch (Throwable ignored) { // guess we won't know the hash code! } final Info oldInfo = ti.info; ti.info = new ObjectInfo(oldInfo, targetClassName, targetHashCode); }
/** * Add information about an object which was being (un-)marshalled. * * @param t the throwable to update * @param targetObject the target object which was being (un-)marshalled */ public static void addObjectInformation(Throwable t, Object targetObject) { final TraceInformation ti = getOrAddTraceInformation(t); final String targetClassName = getNiceClassName(targetObject.getClass()); int targetHashCode = 0; try { targetHashCode = targetObject.hashCode(); } catch (Throwable ignored) { // guess we won't know the hash code! } final Info oldInfo = ti.info; ti.info = new ObjectInfo(oldInfo, targetClassName, targetHashCode); }
/** * Add information about an object which was being (un-)marshalled. * * @param t the throwable to update * @param targetObject the target object which was being (un-)marshalled */ public static void addObjectInformation(Throwable t, Object targetObject) { final TraceInformation ti = getOrAddTraceInformation(t); final String targetClassName = getNiceClassName(targetObject.getClass()); int targetHashCode = 0; try { targetHashCode = targetObject.hashCode(); } catch (Throwable ignored) { // guess we won't know the hash code! } final Info oldInfo = ti.info; ti.info = new ObjectInfo(oldInfo, targetClassName, targetHashCode); }
/** * Add information about an object which was being (un-)marshalled. * * @param t the throwable to update * @param targetObject the target object which was being (un-)marshalled */ public static void addObjectInformation(Throwable t, Object targetObject) { final TraceInformation ti = getOrAddTraceInformation(t); final String targetClassName = getNiceClassName(targetObject.getClass()); int targetHashCode = 0; try { targetHashCode = targetObject.hashCode(); } catch (Throwable ignored) { // guess we won't know the hash code! } final Info oldInfo = ti.info; ti.info = new ObjectInfo(oldInfo, targetClassName, targetHashCode); }