Object (Runnable info) { Object task = info; String extra = null; if (task instanceof FutureTask) { extra = ((FutureTask<?>)task).isCancelled() ? " (future cancelled)" : ((FutureTask<?>)task).isDone() ? " (future done)" : null; Object t1 = ReflectionUtil.getField(task.getClass(), task, Callable.class, "callable"); if (t1 != null) { task = t1; } } if (task instanceof Callable && task.getClass().getName().equals("java.util.concurrent.Executors$RunnableAdapter")) { Object t1 = ReflectionUtil.getField(task.getClass(), task, Runnable.class, "task"); if (t1 != null) { task = t1; } } return extra == null ? task : task.getClass() + extra; }