if (ProducerMethodBean.class.isInstance(bean))
{
final Producer<?> producer = AbstractProducerBean.class.cast(bean).getProducer();
if (BaseProducerProducer.class.isInstance(producer))
{
final BaseProducerProducer producerProducer = BaseProducerProducer.class.cast(producer);
final Set<InjectionPoint> disposalIPs = producerProducer.getDisposalIPs();
if (disposalIPs != null && !producerProducer.isAnyDisposal()) // any can be ambiguous but that's not an issue
{
webBeansUtil.validate(disposalIPs, bean);
}
} // else?
}