code: private static <T> Object subDocumentListCase(Type type, List<T> bsonOject)
              throws IllegalAccessException, InstantiationException, InvocationTargetException {
          ParameterizedType listType = (ParameterizedType) type;
  
          Class<?> listClass = (Class<?>) listType.getActualTypeArguments()[0];
  
          List list = new ArrayList();
          for (T t : bsonOject) {
              list.add(getObjectFromBson(listClass, (BSONObject) t));
          }
  
          return list;
      }
docs: Sub document list case.
  
  @param <T>       the type parameter
  @param type      the type
  @param bsonOject the bson oject
  @return the object
  @throws IllegalAccessException    the illegal access exception
  @throws InstantiationException    the instantiation exception
  @throws InvocationTargetException the invocation target exception