code: public static ClassLoader getClassLoader(Object o)
      {
          if (System.getSecurityManager() != null)
          {
              return AccessController.doPrivileged(new GetClassLoaderAction(o));
          }
          else
          {
              return getClassLoaderInternal(o);
          }
      }
docs: Detect the right ClassLoader.
  The lookup order is determined by:
  <ol>
  <li>ContextClassLoader of the current Thread</li>
  <li>ClassLoader of the given Object 'o'</li>
  <li>ClassLoader of this very ClassUtils class</li>
  </ol>
  
  @param o if not <code>null</code> it may get used to detect the classloader.
  @return The {@link ClassLoader} which should get used to create new instances