// try with inheritance if there's no direct match
serviceClass = serviceForObject(toService, interfaceClass);
}
try {
beanCache.put(toService, bean = new BeanManagerDependencyProvider(beanManager).inject(
serviceClass, serviceClass.getAnnotation(OSImpl.class)));
} catch (Exception e) {
throw new AutoOSException("Cannot resolve implementation of @OS " + interfaceClass
+ " for object of type " + toService, e);
}