code: @SuppressWarnings("unchecked")
      public <T> List<T> getContextualInstances(final Class<T> type) {
          List<T> result = new ArrayList<T>();
          for (Bean<?> bean : manager.getBeans(type)) {
              CreationalContext<T> context = (CreationalContext<T>) manager.createCreationalContext(bean);
              if (context != null) {
                  result.add((T) manager.getReference(bean, type, context));
              }
          }
          return result;
      }
docs: Get all CDI managed instances of a specific class. Return results in a {@link List} in no specific order.
  
  @param type The class for which to return instances.