bean.setEnabled(webBeansContext.getWebBeansUtil().isBeanEnabled(annotatedType, bean.getStereotypes()));
webBeansContext.getWebBeansUtil().checkManagedBeanCondition(annotatedType);
WebBeansUtil.checkGenericType(annotatedType.getJavaClass(), beanAttributes.getScope());
webBeansContext.getWebBeansUtil().validateBeanInjection(bean);
final UnproxyableResolutionException lazyException = webBeansContext.getDeploymentValidationService().validateProxyable(bean);
if (lazyException == null)
{
return bean;
}
return (M) new UnproxyableBean<T>(webBeansContext, WebBeansType.MANAGED, beanAttributes, annotatedType, annotatedType.getJavaClass(), lazyException);