public static @NotNull Field findField(@NotNull Class<?> clazz, final @Nullable Class<?> type, final @NotNull @NonNls String name) throws NoSuchFieldException {
    Field result = findFieldInHierarchy(clazz, field -> name.equals(field.getName()) && (type == null || field.getType().equals(type)));
    if (result != null) return result;

    throw new NoSuchFieldException("Class: " + clazz + " name: " + name + " type: " + type);
  }
public static @NotNull Field findField(@NotNull Class<?> clazz, final @Nullable Class<?> type, final @NotNull @NonNls String name)