* Handles errors thrown during class instantiation
*/
protected void handleInstantiateExceptions(Throwable t, String className) throws ReflectionException, MBeanException
{
if (t instanceof ClassNotFoundException)
throw new ReflectionException((Exception)t, "Class not found: " + className);
else if (t instanceof InstantiationException)
throw new ReflectionException((Exception)t, "Cannot instantiate with no-args constructor: " + className);
else if (t instanceof IllegalAccessException)
throw new ReflectionException((Exception)t, "Illegal access to default constructor: " + className);
else if (t instanceof NoSuchMethodException)
throw new ReflectionException((Exception)t, className + " does not have a public no args constructor.");
else if (t instanceof SecurityException)
throw new ReflectionException((Exception)t, "Can't access default constructor for " + className + ": " + t.toString());
else if (t instanceof InvocationTargetException)
{
Throwable root = ((InvocationTargetException)t).getTargetException();