Class Validator

  • All Implemented Interfaces:
    org.jboss.weld.bootstrap.api.Service
    Direct Known Subclasses:
    ConcurrentValidator

    public class Validator
    extends Object
    implements org.jboss.weld.bootstrap.api.Service
    Checks a list of beans for DeploymentExceptions and their subclasses
    Author:
    Nicklas Karlsson, David Allen, Jozef Hartinger, Stuart Douglas, Ales Justin
    • Constructor Detail

      • Validator

        public Validator​(Set<PlugableValidator> plugableValidators,
                         Map<jakarta.enterprise.inject.spi.Bean<?>,​Boolean> resolvedInjectionPoints)
    • Method Detail

      • validateGeneralBean

        protected void validateGeneralBean​(jakarta.enterprise.inject.spi.Bean<?> bean,
                                           BeanManagerImpl beanManager)
      • validateRIBean

        protected void validateRIBean​(CommonBean<?> bean,
                                      BeanManagerImpl beanManager,
                                      Collection<CommonBean<?>> specializedBeans)
        Validate an RIBean. This includes validating whether two beans specialize the same bean
        Parameters:
        bean - the bean to validate
        beanManager - the current manager
        specializedBeans - the existing specialized beans
      • validateInjectionPoint

        public void validateInjectionPoint​(jakarta.enterprise.inject.spi.InjectionPoint ij,
                                           BeanManagerImpl beanManager)
        Validate an injection point
        Parameters:
        ij - the injection point to validate
        beanManager - the bean manager
      • validateInjectionPointForDefinitionErrors

        public void validateInjectionPointForDefinitionErrors​(jakarta.enterprise.inject.spi.InjectionPoint ij,
                                                              jakarta.enterprise.inject.spi.Bean<?> bean,
                                                              BeanManagerImpl beanManager)
        Checks for definition errors associated with a given InjectionPoint
      • validateMetadataInjectionPoint

        public void validateMetadataInjectionPoint​(jakarta.enterprise.inject.spi.InjectionPoint ij,
                                                   jakarta.enterprise.inject.spi.Bean<?> bean,
                                                   MessageCallback<DefinitionException> messageCallback)
      • validateEventMetadataInjectionPoint

        public void validateEventMetadataInjectionPoint​(jakarta.enterprise.inject.spi.InjectionPoint ip)
      • validateInjectionPointForDeploymentProblems

        public void validateInjectionPointForDeploymentProblems​(jakarta.enterprise.inject.spi.InjectionPoint ij,
                                                                jakarta.enterprise.inject.spi.Bean<?> bean,
                                                                BeanManagerImpl beanManager)
        Checks for deployment problems associated with a given InjectionPoint
      • validateProducers

        public void validateProducers​(Collection<jakarta.enterprise.inject.spi.Producer<?>> producers,
                                      BeanManagerImpl beanManager)
      • validateProducer

        public void validateProducer​(jakarta.enterprise.inject.spi.Producer<?> producer,
                                     BeanManagerImpl beanManager)
      • validateInjectionPointPassivationCapable

        public void validateInjectionPointPassivationCapable​(jakarta.enterprise.inject.spi.InjectionPoint ij,
                                                             jakarta.enterprise.inject.spi.Bean<?> resolvedBean,
                                                             BeanManagerImpl beanManager)
      • validateInterceptorDecoratorInjectionPointPassivationCapable

        public void validateInterceptorDecoratorInjectionPointPassivationCapable​(jakarta.enterprise.inject.spi.InjectionPoint ij,
                                                                                 jakarta.enterprise.inject.spi.Bean<?> resolvedBean,
                                                                                 BeanManagerImpl beanManager,
                                                                                 jakarta.enterprise.inject.spi.Bean<?> bean)
      • validateSpecialization

        public void validateSpecialization​(BeanManagerImpl manager)
      • validateBeans

        public void validateBeans​(Collection<? extends jakarta.enterprise.inject.spi.Bean<?>> beans,
                                  BeanManagerImpl manager)
      • validateInterceptors

        public void validateInterceptors​(Collection<? extends jakarta.enterprise.inject.spi.Interceptor<?>> interceptors,
                                         BeanManagerImpl manager)
      • validateInterceptor

        protected void validateInterceptor​(jakarta.enterprise.inject.spi.Interceptor<?> interceptor,
                                           BeanManagerImpl manager)
      • validateDecorators

        public void validateDecorators​(Collection<? extends jakarta.enterprise.inject.spi.Decorator<?>> decorators,
                                       BeanManagerImpl manager)
      • validateDecorator

        protected void validateDecorator​(jakarta.enterprise.inject.spi.Decorator<?> decorator,
                                         Collection<CommonBean<?>> specializedBeans,
                                         BeanManagerImpl manager)
      • validateBeanNames

        public void validateBeanNames​(BeanManagerImpl beanManager)
      • checkBeanMetadataInjectionPoint

        public static void checkBeanMetadataInjectionPoint​(Object bean,
                                                           jakarta.enterprise.inject.spi.InjectionPoint ip,
                                                           Type expectedTypeArgument)
      • cleanup

        public void cleanup()
        Specified by:
        cleanup in interface org.jboss.weld.bootstrap.api.Service
      • isResolved

        public boolean isResolved​(jakarta.enterprise.inject.spi.Bean<?> bean)
      • clearResolved

        public void clearResolved()