Best practice for fail-safe class loading
<p>In my <a href="http://jodd.org" rel="nofollow">Jodd library</a> I have a method that loads a class from given class name. Since this method has to be fail-safe (and smart;),  i coded several ways for loading a class in following order:</p>

<ul>
<li><p>using current thread classloader: </p>

<p><code>Thread.currentThread().getContextClassLoader().loadClass(className);</code></p></li>
<li><p>if above fails, than <code>forName</code> is used:</p>

<p><code>Class.forName(className);</code></p></li>
<li><p>if above fails, then classloader of util class is used: </p>

<p><code>ClassLoaderUtil.class.getClassLoader().loadClass(className);</code></p></li>
<li><p>and, if a an optional Class argument is given, its classloader is used:</p>

<p><code>callingClass.getClassLoader().loadClass(className);</code></p></li>
</ul>

<p>Do you think this is a good order and/or should some steps be removed/added? Thanx.</p>
