View v = (View) c;
Annotation[] annotations = v.getClass().getAnnotations();
if (ArrayUtils.isNotEmpty(annotations)) {
for (Annotation a: annotations) {
if (a instanceof VaadinView) {
VaadinView vv = (VaadinView) a;
// really just need the presenter whose name matched VaadinView#name to be
// called into being, but Spring caches scoped-beans too
context.getBeansWithAnnotation(VaadinPresenter.class);
eventBus.publish(this, new Screen(vv.name()));
break;
}
}
}
}