public Class<?> classForName(String name)
{
ClassLoader classLoader = clRef.get();
if (classLoader == null)
throw new ResourceLoadingException("Error loading class " + name + ", classloader GC-ed.");
try
{
return classLoader.loadClass(name);
}
catch (ClassNotFoundException e)
{
throw new ResourceLoadingException("Error loading class " + name, e);
}
catch (NoClassDefFoundError e)
{
throw new ResourceLoadingException("Error loading class " + name, e);
}
catch (TypeNotPresentException e)
{
throw new ResourceLoadingException("Error loading class " + name, e);
}
}