code: protected <T> T getInstanceByType(BeanManager manager, Class<T> type, Annotation... bindings) {
          final Bean<?> bean = manager.resolve(manager.getBeans(type, bindings));
          if (bean == null) {
              throw CommonLogger.LOG.unableToResolveBean(type, Arrays.asList(bindings));
          }
          CreationalContext<?> cc = manager.createCreationalContext(bean);
          return type.cast(manager.getReference(bean, type, cc));
      }
docs: Utility method allowing managed instances of beans to provide entry points for non-managed beans (such as {@link WeldContainer}). Should only called once
  Weld has finished booting.
  
  @param manager the BeanManager to use to access the managed instance
  @param type the type of the Bean
  @param bindings the bean's qualifiers
  @return a managed instance of the bean
  @throws IllegalArgumentException if the given type represents a type variable
  @throws IllegalArgumentException if two instances of the same qualifier type are given
  @throws IllegalArgumentException if an instance of an annotation that is not a qualifier type is given
  @throws UnsatisfiedResolutionException if no beans can be resolved * @throws AmbiguousResolutionException if the ambiguous dependency resolution rules
  fail
  @throws IllegalArgumentException if the given type is not a bean type of the given bean