code: private static void collectConstants(@NonNull Class<?> someClass, @NonNull JSONObject container) throws JSONException {
          final Field[] fields = someClass.getFields();
          for (final Field field : fields) {
              try {
                  final Object value = field.get(null);
                  if (value != null) {
                      if (field.getType().isArray()) {
                          container.put(field.getName(), new JSONArray(Arrays.asList((Object[]) value)));
                      } else {
                          container.put(field.getName(), value);
                      }
                  }
              } catch (IllegalArgumentException ignored) {
                  // NOOP
              } catch (IllegalAccessException ignored) {
                  // NOOP
              }
          }
      }
docs: Retrieves key/value pairs from static fields of a class.
  
  @param someClass the class to be inspected.