/** * {@inheritDoc} */ public M getBean() { M bean = (M) new ManagedBean<>(webBeansContext, WebBeansType.MANAGED, annotatedType, beanAttributes, annotatedType.getJavaClass()); bean.setEnabled(webBeansContext.getWebBeansUtil().isBeanEnabled(beanAttributes, annotatedType, bean.getStereotypes())); webBeansContext.getWebBeansUtil().checkManagedBeanCondition(annotatedType); WebBeansUtil.checkGenericType(annotatedType.getJavaClass(), beanAttributes.getScope()); webBeansContext.getWebBeansUtil().validateBeanInjection(bean); UnproxyableResolutionException lazyException = webBeansContext.getDeploymentValidationService().validateProxyable(bean, ignoreFinalMethods); if (lazyException == null) { return bean; } return (M) new UnproxyableBean<>(webBeansContext, WebBeansType.MANAGED, beanAttributes, annotatedType, annotatedType.getJavaClass(), lazyException); } }
.validateProxyable(producerFieldBean, processBeanAttributes.isIgnoreFinalMethods()); if (lazyException != null) // should we use UnproxyableBean there too? if not required by TCK, better to fail eagerly
.validateProxyable(producerMethodBean, processBeanAttributes.isIgnoreFinalMethods()); if (lazyException != null) // should we use UnproxyableBean there too? if not required by TCK, better to fail eagerly