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 void
checkBeanMetadataInjectionPoint(Object bean, jakarta.enterprise.inject.spi.InjectionPoint ip, Type expectedTypeArgument)
void
cleanup()
void
clearResolved()
boolean
isResolved(jakarta.enterprise.inject.spi.Bean<?> bean)
protected void
validateBean(jakarta.enterprise.inject.spi.Bean<?> bean, Collection<CommonBean<?>> specializedBeans, BeanManagerImpl manager, List<RuntimeException> problems)
protected void
validateBeanName(String name, SetMultimap<String,jakarta.enterprise.inject.spi.Bean<?>> namedAccessibleBeans, List<String> accessibleNamespaces, BeanManagerImpl beanManager)
void
validateBeanNames(BeanManagerImpl beanManager)
void
validateBeans(Collection<? extends jakarta.enterprise.inject.spi.Bean<?>> beans, BeanManagerImpl manager)
protected void
validateDecorator(jakarta.enterprise.inject.spi.Decorator<?> decorator, Collection<CommonBean<?>> specializedBeans, BeanManagerImpl manager)
void
validateDecorators(Collection<? extends jakarta.enterprise.inject.spi.Decorator<?>> decorators, BeanManagerImpl manager)
void
validateDeployment(BeanManagerImpl manager, BeanDeployment deployment)
void
validateEventMetadataInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint ip)
protected void
validateGeneralBean(jakarta.enterprise.inject.spi.Bean<?> bean, BeanManagerImpl beanManager)
void
validateInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint ij, BeanManagerImpl beanManager)
Validate an injection pointvoid
validateInjectionPointForDefinitionErrors(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> bean, BeanManagerImpl beanManager)
Checks for definition errors associated with a givenInjectionPoint
void
validateInjectionPointForDeploymentProblems(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> bean, BeanManagerImpl beanManager)
Checks for deployment problems associated with a givenInjectionPoint
void
validateInjectionPointPassivationCapable(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> resolvedBean, BeanManagerImpl beanManager)
protected void
validateInterceptor(jakarta.enterprise.inject.spi.Interceptor<?> interceptor, BeanManagerImpl manager)
void
validateInterceptorDecoratorInjectionPointPassivationCapable(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> resolvedBean, BeanManagerImpl beanManager, jakarta.enterprise.inject.spi.Bean<?> bean)
void
validateInterceptors(Collection<? extends jakarta.enterprise.inject.spi.Interceptor<?>> interceptors, BeanManagerImpl manager)
void
validateMetadataInjectionPoint(jakarta.enterprise.inject.spi.InjectionPoint ij, jakarta.enterprise.inject.spi.Bean<?> bean, MessageCallback<DefinitionException> messageCallback)
protected void
validateObserverMethods(Iterable<ObserverInitializationContext<?,?>> observers, BeanManagerImpl beanManager)
void
validateProducer(jakarta.enterprise.inject.spi.Producer<?> producer, BeanManagerImpl beanManager)
void
validateProducers(Collection<jakarta.enterprise.inject.spi.Producer<?>> producers, BeanManagerImpl beanManager)
protected void
validateRIBean(CommonBean<?> bean, BeanManagerImpl beanManager, Collection<CommonBean<?>> specializedBeans)
Validate an RIBean.void
validateSpecialization(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:
cleanup
in interfaceorg.jboss.weld.bootstrap.api.Service
-
isResolved
public boolean isResolved(jakarta.enterprise.inject.spi.Bean<?> bean)
-
clearResolved
public void clearResolved()
-
-