Class SpecializationUtil


  • public class SpecializationUtil
    extends Object
    This class contains a few helpers for handling @Specializes.
    • Constructor Detail

      • SpecializationUtil

        public SpecializationUtil​(WebBeansContext webBeansContext)
    • Method Detail

      • removeDisabledBeanAttributes

        public void removeDisabledBeanAttributes​(Map<org.apache.webbeans.spi.BeanArchiveService.BeanArchiveInformation,​Map<jakarta.enterprise.inject.spi.AnnotatedType<?>,​BeansDeployer.ExtendedBeanAttributes<?>>> beanAttributesPerBda,
                                                 SpecializationUtil.BeanAttributesProvider attributeProvider,
                                                 boolean notSpecializationOnly)
        This method iterates over all given BeanAttributes and removes those which are 'Specialised away'. This methods gets invoked twice. The first pass is over the plain scanned classes. The second pass is for any specialised producer fields and methods. We need to do this twice as producers of 'disabled beans' must not get taken into consideration.
        Parameters:
        beanAttributesPerBda - all annotatypes sliced by BDA
        attributeProvider - if not null provides bean attributes to be able to validate types contains superclass. Needed for producers.
        notSpecializationOnly - first pass/2nd pass. First one removes only root beans, second one handles inheritance even in @Spe