public static @NotNull Field findAssignableField(@NotNull Class<?> clazz, final @Nullable("null means any type") Class<?> fieldType, @NotNull @NonNls String fieldName) throws NoSuchFieldException {
    Field result = findFieldInHierarchy(clazz, field -> fieldName.equals(field.getName()) && (fieldType == null || fieldType.isAssignableFrom(field.getType())));
    if (result != null) {
      return result;
    }
    throw new NoSuchFieldException("Class: " + clazz + " fieldName: " + fieldName + " fieldType: " + fieldType);
  }
public static @NotNull Field findAssignableField(@NotNull Class<?> clazz, final @Nullable("null means any type") Class<?> fieldType, @NotNull @NonNls String fieldName)