Class CdiUtil
java.lang.Object
org.glassfish.jersey.ext.cdi1x.internal.CdiUtil
Common CDI utility methods.
- Author:
- Jakub Podlesak, Michal Gajdos
-
Method Summary
Modifier and TypeMethodDescriptionstatic jakarta.enterprise.inject.spi.BeanManager
Get me current bean manager.static Class<? extends Annotation>
getBeanScope
(Class<?> beanClass, jakarta.enterprise.inject.spi.BeanManager beanManager) Get me scope of a bean corresponding to given class.static Annotation[]
getQualifiers
(Annotation[] annotations) Get me list of qualifiers included in given annotation list.
-
Method Details
-
getQualifiers
Get me list of qualifiers included in given annotation list.- Parameters:
annotations
- list of annotations to introspect- Returns:
- annotations from the input list that are marked as qualifiers
-
getBeanManager
public static jakarta.enterprise.inject.spi.BeanManager getBeanManager()Get me current bean manager. Method first tries to lookup available providers viaMETA-INF/services
. If not found the bean manager is returned from the default provider.- Returns:
- bean manager
-
getBeanScope
public static Class<? extends Annotation> getBeanScope(Class<?> beanClass, jakarta.enterprise.inject.spi.BeanManager beanManager) Get me scope of a bean corresponding to given class.- Parameters:
beanClass
- bean class in question.beanManager
- actual bean manager.- Returns:
- actual bean scope or null, if the scope could not be determined.
-