} catch (NoSuchMethodException ex) {
try {
return delegate.getClass().getMethod(method.getName(),
method.getParameterTypes()).invoke(delegate, args);
} catch (IllegalArgumentException ex1) {
throw new ComponentException(method.toString()
+ " is not supported on the component " + getComponentContract());
} catch (IllegalAccessException ex1) {
throw new ComponentException(method.toString()
+ " is not supported on the component " + getComponentContract());
} catch (InvocationTargetException ex1) {
if (ex1.getCause() instanceof RuntimeException) {
throw (RuntimeException) ex1.getCause();
}
throw new ComponentException(ex1.getCause());
}
}
}