Class BeanHelper
java.lang.Object
org.glassfish.jersey.inject.cdi.se.bean.BeanHelper
Helper class to register a
Bean
into CDI BeanManager
.- Author:
- Petr Bouda
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T>
createEnhancedAnnotatedType
(org.jboss.weld.injection.producer.BasicInjectionTarget<T> it) static <T> void
registerBean
(ClassBinding<T> binding, jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, Collection<InjectionResolver> resolvers, jakarta.enterprise.inject.spi.BeanManager beanManager) Registers a class asJerseyBean
intoBeanManager
.static <T> void
registerBean
(InstanceBinding<T> binding, jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, List<InjectionResolver> resolvers) Registers an instance asJerseyBean
intoBeanManager
.static <T> void
registerSupplier
(SupplierClassBinding<T> binding, jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, Collection<InjectionResolver> resolvers, jakarta.enterprise.inject.spi.BeanManager beanManager) Registers a class supplier and its provided value asJerseyBean
s intoBeanManager
.static <T> void
registerSupplier
(SupplierInstanceBinding<T> binding, jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, jakarta.enterprise.inject.spi.BeanManager beanManager) Registers an instance supplier and its provided value asJerseyBean
s intoBeanManager
.
-
Method Details
-
registerBean
public static <T> void registerBean(InstanceBinding<T> binding, jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, List<InjectionResolver> resolvers) Registers an instance asJerseyBean
intoBeanManager
.- Type Parameters:
T
- type of the instance which is registered.- Parameters:
binding
- object containingBeanAttributes
information.abd
-AfterBeanDiscovery
event.resolvers
- all registered injection resolvers.
-
registerBean
public static <T> void registerBean(ClassBinding<T> binding, jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, Collection<InjectionResolver> resolvers, jakarta.enterprise.inject.spi.BeanManager beanManager) Registers a class asJerseyBean
intoBeanManager
.- Type Parameters:
T
- type of the class which is registered.- Parameters:
binding
- object containingBeanAttributes
information.abd
-AfterBeanDiscovery
event.resolvers
- all registered injection resolvers.beanManager
- currently used bean manager.
-
registerSupplier
public static <T> void registerSupplier(SupplierInstanceBinding<T> binding, jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, jakarta.enterprise.inject.spi.BeanManager beanManager) Registers an instance supplier and its provided value asJerseyBean
s intoBeanManager
.- Type Parameters:
T
- type of the instance which is registered.- Parameters:
binding
- object containingBeanAttributes
information.abd
-AfterBeanDiscovery
event.
-
registerSupplier
public static <T> void registerSupplier(SupplierClassBinding<T> binding, jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, Collection<InjectionResolver> resolvers, jakarta.enterprise.inject.spi.BeanManager beanManager) Registers a class supplier and its provided value asJerseyBean
s intoBeanManager
.- Type Parameters:
T
- type of the class which is registered.- Parameters:
binding
- object containingBeanAttributes
information.abd
-AfterBeanDiscovery
event.resolvers
- all registered injection resolvers.beanManager
- currently used bean manager.
-
createEnhancedAnnotatedType
public static <T> org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType<T> createEnhancedAnnotatedType(org.jboss.weld.injection.producer.BasicInjectionTarget<T> it)
-