@Override
public <I> void hear(final TypeLiteral<I> typeLiteral, TypeEncounter<I> typeEncounter) {
typeEncounter.register(new InjectionListener<I>() {
@Override
public void afterInjection(Object object) {
final View view = (View) object;
final Iterable<ViewMBean> viewMamanagementBeans = viewManagementOf(view);
final Closer closer = view.unwrap().utils().injector().getInstance(Closer.class);
//We get the name from the view and not from the view management object to avoid proxy issues.
final String name = view.unwrap().getName();
managementContext.register(view);
//Manage the created management view objects to the context.
for (ViewMBean viewMBean : viewMamanagementBeans) {
managementContext.manage(viewMBean, name);