// maybe its a class
bean = context.getClassResolver().resolveClass(name);
if (bean == null) {
// no its not a class then we cannot find the bean
throw new NoSuchBeanException(name);
}
// could be a class then create an instance of it
if (bean instanceof Class) {
// bean is a class so create an instance of it
bean = context.getInjector().newInstance((Class<?>)bean);