I\'m using the method ApplicationContext.getBean(String name, Class requiredType). The bean is of type util:set. My code looks like:
Set mySe
maybe this can be usefull to you:
Set setBean= null;
Map beans = applicationContext.getBeansOfType(Set.class);
for (Map.Entry bean: beans.entrySet()) {
ParameterizedType thisType = (ParameterizedType) bean.getClass().getGenericSuperclass();
Class> parametrizedClass= thisType.getActualTypeArguments()[0];
if (parametrizedClass.isAssignableFrom(String)) {
setBean= (Set) bean;
}
}
http://javahelp.redsaltillo.net