/** * @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); }
public <U extends T> Event<U> select(TypeLiteral<U> subtype, Annotation... qualifiers) { return selectEvent(subtype.getType(), qualifiers); }
@SuppressWarnings("unchecked") public static <T> Set<Bean<T>> getBeans( BeanManager beanManager, TypeLiteral<T> type, Annotation... bindings) { return (Set) beanManager.getBeans(type.getType(), bindings); }