if (BuiltInOwbBean.class.isInstance(bean))
{
final Class<?> proxyable = BuiltInOwbBean.class.cast(bean).proxyableType();
if (proxyable != null)
{
final AbstractProducer producer = AbstractProducer.class.cast(OwbBean.class.cast(bean).getProducer());
final AnnotatedType<?> annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(proxyable);
producer.defineInterceptorStack(bean, annotatedType, webBeansContext);
}
}
continue;
}
String beanName = bean.getName();
if(beanName != null)
{
beanNames.push(beanName);
}
if (bean instanceof OwbBean && !(bean instanceof Interceptor) && !(bean instanceof Decorator))
{
OwbBean<T> owbBean = (OwbBean<T>)bean;
if (owbBean.getProducer() instanceof AbstractProducer)
{
AbstractProducer<T> producer = (AbstractProducer<T>)owbBean.getProducer();
AnnotatedType<T> annotatedType;
if (owbBean instanceof InjectionTargetBean)
{
annotatedType = ((InjectionTargetBean<T>)owbBean).getAnnotatedType();
}
else
{
annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(owbBean.getReturnType());
}
producer.defineInterceptorStack(owbBean, annotatedType, webBeansContext);
}
}
//Check passivation scope
checkPassivationScope(bean);