Method method = pd.getReadMethod();
Collection<String> c = CastUtils.cast((Collection<?>)method.invoke(bean, new Object[0]));
return c;
} catch (IllegalArgumentException e) {
throw new BeanInitializationException("Could not retrieve ids.", e);
} catch (IllegalAccessException e) {
throw new BeanInitializationException("Could not access id getter.", e);
} catch (InvocationTargetException e) {
throw new BeanInitializationException("Could not invoke id getter.", e);
} catch (SecurityException e) {
throw new BeanInitializationException("Could not invoke id getter.", e);
}
}