code: private static Class getGenericFieldType(Field field, int typeIndex, int nestingLevel) {
         return toClass(extractType(null, field.getGenericType(), typeIndex, nestingLevel));
     }
docs: Extract the generic type from the given field.
  @param field the field to check the type for
  @param typeIndex the index of the type (e.g. 0 for Collections,
  0 for Map keys, 1 for Map values)
  @param nestingLevel the nesting level of the target type
  @return the generic type, or <code>null</code> if none