code: public static Collection<?> createEmptyCollectionForType(Class<?> fieldType, int initialSize) {
          rejectUnsupportedTypes(fieldType);
          Collection<?> collection;
          try {
              collection = (Collection<?>) fieldType.newInstance();
          } catch (InstantiationException | IllegalAccessException e) {
              if (fieldType.equals(ArrayBlockingQueue.class)) {
                  collection = new ArrayBlockingQueue<>(initialSize);
              } else {
                  collection = (Collection<?>) new ObjenesisStd().newInstance(fieldType);
              }
          }
          return collection;
      }
docs: Create an empty collection for the given type.
  @param fieldType for which an empty collection should we created
  @param initialSize initial size of the collection
  @return empty collection