question: public static void wrapThreadLoader ( ClassLoader ldr , Runnable c ) { Thread curThread = Thread . currentThread ( ) ; ClassLoader ctxLdr = curThread . getContextClassLoader ( ) ; try { curThread . setContextClassLoader ( ldr ) ; c . run ( ) ; } finally { curThread . setContextClassLoader ( ctxLdr ) ; } }
target:  Sets thread context class loader to the given loader, executes the closure, and then resets thread context class loader to its initial value.