code: private static void gatherFields(Class<?> clazz, List<Field> collected, HashSet<Class<?>> visited) {
  		if (visited.contains(clazz)) {
  			return;
  		}
  		visited.add(clazz);
  		Field[] fields = jlClassGetDeclaredFields(clazz);
  		for (Field f : fields) {
  			if (Modifier.isPublic(f.getModifiers())) {
  				collected.add(f);
  			}
  		}
  		if (!clazz.isInterface()) {
  			Class<?> supr = clazz.getSuperclass();
  			if (supr != null) {
  				gatherFields(supr, collected, visited);
  			}
  		}
  		for (Class<?> itf : clazz.getInterfaces()) {
  			gatherFields(itf, collected, visited);
  		}
  	}
docs: Gather up all (public) fields in an interface and all its super interfaces recursively.
  
  @param clazz the class for which to collect up fields
  @param collected a collector that has fields added to it as this method runs (recursively)
  @param visited a set recording which types have already been visited