public static ClassLoader getClassLoaderAsPrivileged ( final Class < ? > clazz ) { if ( ! HAS_GET_CLASS_LOADER_PERMISSION ) return null ; else return AccessController . doPrivileged ( new PrivilegedAction < ClassLoader > ( ) { public ClassLoader run ( ) { return clazz . getClassLoader ( ) ; } } ) ; }
Returns the class loader of clazz in an access privileged section .