code: public static ClassLoader getClassLoader(Class clazz){
          ClassLoader classLoader = clazz.getClassLoader();
          return classLoader==null ? ClassLoader.getSystemClassLoader() : classLoader;
      }
docs: Returns the classloader for the speficied <code>clazz</code>. Unlike
  {@link Class#getClassLoader()} this will never return null.