Package org.jboss.weld.bootstrap
Class Validator
- java.lang.Object
-
- org.jboss.weld.bootstrap.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 Summary
Constructors Constructor Description Validator(Set<PlugableValidator> plugableValidators, Map<jakarta.enterprise.inject.spi.Bean<?>,Boolean> resolvedInjectionPoints)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcheckBeanMetadataInjectionPoint(Object bean, jakarta.enterprise.inject.spi.InjectionPoint ip, Type expectedTypeArgument)voidcleanup()voidclearResolved()booleanisResolved(jakarta.enterprise.inject.spi.Bean<?> bean)protected voidvalidateBean(jakarta.enterprise.inject.spi.Bean<?> bean, Collection<CommonBean<?>> specializedBeans, BeanManagerImpl manager, List<RuntimeException> problems)protected voidvalidateBeanName(String name, SetMultimap<String,jakarta.enterprise.inject.spi.Bean<?>> namedAccessibleBeans, List<String> accessibleNamespaces, BeanManagerImpl beanManager)voidvalidateBeanNames(BeanManagerImpl beanManager)voidvalidateBeans(Collection<? extends jakarta.enterprise.inject.spi.Bean<?>> beans, BeanManagerImpl manager)protected voidvalidateDecorator(jakarta.enterprise.inject.spi.Decorator<?> decorator, Collection<CommonBean<?>> specializedBeans, BeanManagerImpl manager)voidvalidateDecorators(Collection<? extends jakarta.enterprise.inject.spi.Decorator<?>> decorators, BeanManagerImpl manager)voidvalidateDeployment(BeanManagerImpl manager, BeanDeployment deployment)voidvalidateEventMetadataInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint ip)protected voidvalidateGeneralBean(jakarta.enterprise.inject.spi.Bean<?> bean, BeanManagerImpl beanManager)voidvalidateInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint ij, BeanManagerImpl beanManager)Validate an injection pointvoidvalidateInjectionPointForDefinitionErrors(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> bean, BeanManagerImpl beanManager)Checks for definition errors associated with a givenInjectionPointvoidvalidateInjectionPointForDeploymentProblems(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> bean, BeanManagerImpl beanManager)Checks for deployment problems associated with a givenInjectionPointvoidvalidateInjectionPointPassivationCapable(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> resolvedBean, BeanManagerImpl beanManager)protected voidvalidateInterceptor(jakarta.enterprise.inject.spi.Interceptor<?> interceptor, BeanManagerImpl manager)voidvalidateInterceptorDecoratorInjectionPointPassivationCapable(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> resolvedBean, BeanManagerImpl beanManager, jakarta.enterprise.inject.spi.Bean<?> bean)voidvalidateInterceptors(Collection<? extends jakarta.enterprise.inject.spi.Interceptor<?>> interceptors, BeanManagerImpl manager)voidvalidateMetadataInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> bean, MessageCallback<DefinitionException> messageCallback)protected voidvalidateObserverMethods(Iterable<ObserverInitializationContext<?,?>> observers, BeanManagerImpl beanManager)voidvalidateProducer(jakarta.enterprise.inject.spi.Producer<?> producer, BeanManagerImpl beanManager)voidvalidateProducers(Collection<jakarta.enterprise.inject.spi.Producer<?>> producers, BeanManagerImpl beanManager)protected voidvalidateRIBean(CommonBean<?> bean, BeanManagerImpl beanManager, Collection<CommonBean<?>> specializedBeans)Validate an RIBean.voidvalidateSpecialization(BeanManagerImpl manager)
-
-
-
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 validatebeanManager- the current managerspecializedBeans- 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 validatebeanManager- 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 givenInjectionPoint
-
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 givenInjectionPoint
-
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)
-
validateDeployment
public void validateDeployment(BeanManagerImpl manager, BeanDeployment deployment)
-
validateSpecialization
public void validateSpecialization(BeanManagerImpl manager)
-
validateBeans
public void validateBeans(Collection<? extends jakarta.enterprise.inject.spi.Bean<?>> beans, BeanManagerImpl manager)
-
validateBean
protected void validateBean(jakarta.enterprise.inject.spi.Bean<?> bean, Collection<CommonBean<?>> specializedBeans, BeanManagerImpl manager, List<RuntimeException> problems)
-
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)
-
validateBeanName
protected void validateBeanName(String name, SetMultimap<String,jakarta.enterprise.inject.spi.Bean<?>> namedAccessibleBeans, List<String> accessibleNamespaces, BeanManagerImpl beanManager)
-
validateObserverMethods
protected void validateObserverMethods(Iterable<ObserverInitializationContext<?,?>> observers, BeanManagerImpl beanManager)
-
checkBeanMetadataInjectionPoint
public static void checkBeanMetadataInjectionPoint(Object bean, jakarta.enterprise.inject.spi.InjectionPoint ip, Type expectedTypeArgument)
-
cleanup
public void cleanup()
- Specified by:
cleanupin interfaceorg.jboss.weld.bootstrap.api.Service
-
isResolved
public boolean isResolved(jakarta.enterprise.inject.spi.Bean<?> bean)
-
clearResolved
public void clearResolved()
-
-