示例#1
0
 /**
  * @param beanManager
  * @param beanTypeLiteral
  * @param qualifiers
  * @return
  */
 public static <T> T getContextualReference(
     BeanManager beanManager, TypeLiteral<T> beanTypeLiteral, Annotation... qualifiers) {
   Type beanType = beanTypeLiteral.getType();
   Set<Bean<?>> beans = getBeans(beanManager, beanType, qualifiers);
   return BeanLookupUtils.<T>getContextualReference(beanManager, beanType, beans);
 }
示例#2
0
 public <U extends T> Event<U> select(TypeLiteral<U> subtype, Annotation... qualifiers) {
   return selectEvent(subtype.getType(), qualifiers);
 }
示例#3
0
 @SuppressWarnings("unchecked")
 public static <T> Set<Bean<T>> getBeans(
     BeanManager beanManager, TypeLiteral<T> type, Annotation... bindings) {
   return (Set) beanManager.getBeans(type.getType(), bindings);
 }