class SimpleThreadFactory implements java.util.concurrent.ThreadFactory {
    /** The thread name prefix. */
    private final String threadNamePrefix;

    /** The thread index counter, used for assigning unique thread ids. */
    private static final AtomicInteger threadIdx = new AtomicInteger();

    /** Whether to set daemon mode. */
    private final boolean daemon;

    /**
     * Constructor.
     *
     * @param threadNamePrefix
     *            prefix for created threads.
     * @param daemon
     *            create daemon threads?
     */
    SimpleThreadFactory(final String threadNamePrefix, final boolean daemon) {
        this.threadNamePrefix = threadNamePrefix;
        this.daemon = daemon;
    }

    /**
     * New thread.
     *
     * @param runnable
     *            the runnable
     * @return the thread
     */
    @Override
    public Thread newThread(final Runnable runnable) {<FILL_FUNCTION_BODY>}
}

        // Call System.getSecurityManager().getThreadGroup() via reflection, since it is deprecated in JDK 17
        ThreadGroup securityManagerThreadGroup = null;
        try {
            final Method getSecurityManager = System.class.getDeclaredMethod("getSecurityManager");
            final Object securityManager = getSecurityManager.invoke(null);
            if (securityManager != null) {
                final Method getThreadGroup = securityManager.getClass().getDeclaredMethod("getThreadGroup");
                securityManagerThreadGroup = (ThreadGroup) getThreadGroup.invoke(securityManager);
            }
        } catch (final Throwable t) {
            // Fall through
        }
        final Thread thread = new Thread(
                securityManagerThreadGroup != null ? securityManagerThreadGroup
                        : new ThreadGroup("ClassGraph-thread-group"),
                runnable, threadNamePrefix + threadIdx.getAndIncrement());
        thread.setDaemon(daemon);
        return thread;
    
<no_super_class>