java.lang.Object
org.glassfish.jersey.ext.cdi1x.internal.CdiUtil

public final class CdiUtil extends Object
Common CDI utility methods.
Author:
Jakub Podlesak, Michal Gajdos
  • Method Details

    • getQualifiers

      public static Annotation[] getQualifiers(Annotation[] annotations)
      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 via META-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.