names.add(s);
}
}
Collections.reverse(names);
for (String s : names) {
BeanRecipe r = (BeanRecipe)container.getRepository().getRecipe(s);
Class<?> beanType = r.getType();
Class<? extends T> t = beanType.asSubclass(type);
if (listener.loadBean(s, t)) {
Object o = container.getComponentInstance(s);
if (listener.beanLoaded(s, type.cast(o))) {
return true;