private void printThread()

in src/main/java/org/apache/sling/commons/threaddump/internal/BaseThreadDumper.java [99:120]


    private void printThread(PrintWriter pw, Thread thread, boolean withStackTrace) {
        if (thread != null) {
            StringBuffer info = new StringBuffer();
            info.append("  Thread ").append(thread.getId());
            info.append('/').append(thread.getName());
            info.append(" [");
            info.append("priority=").append(thread.getPriority());
            info.append(", alive=").append(thread.isAlive());
            info.append(", daemon=").append(thread.isDaemon());
            info.append(", interrupted=").append(thread.isInterrupted());
            info.append(", loader=").append(thread.getContextClassLoader());
            info.append(']');

            pw.println(info);

            if (withStackTrace) {
                printClassLoader(pw, thread.getContextClassLoader());
                printStackTrace(pw, thread.getStackTrace());
                pw.println();
            }
        }
    }