code: public static boolean isCollectionField(Class<?> clazz, String fieldName, Class<?> collectionElementType,
                                              boolean forceAccess) {
          Field field = FieldUtils.getField(clazz, fieldName, forceAccess);
          if (field == null) {
              return false;
          }
          boolean isCollectionField = false;
  
          if (Collection.class.isAssignableFrom(field.getType())) {
              ParameterizedType collType = (ParameterizedType) field.getGenericType();
              Class<?> elementTypeOfCollection = (Class<?>) collType.getActualTypeArguments()[0];
              isCollectionField = elementTypeOfCollection.isAssignableFrom(collectionElementType);
          }
  
          return isCollectionField;
      }
docs: Checks whether the given <code>fieldName</code> in <code>clazz</code> is
  a collection field with elements of type
  <code>collectionElementType</code>.
  
  @param clazz                 The class to check for the given collection field
  @param fieldName             The name of the collection field
  @param collectionElementType The type of the concrete element in the collection
  @param forceAccess           whether to break scope restrictions using the
  {@link java.lang.reflect.AccessibleObject#setAccessible(boolean)}
  method. {@code false} will only match {@code public} fields.
  @return Whether or not the given <code>fieldName</code> in
  <code>clazz</code> is a collection field with elements of type
  <code>collectionElementType</code>.