code: private Field[] fields(Class<?> clazz)
      {
  
          Map<String, Field> fields = new HashMap<String, Field>();
          do
          {
              for (Field field : clazz.getDeclaredFields())
              {
                  if (!fields.containsKey(field.getName()))
                  {
                      fields.put(field.getName(), field);
                  }
              }
              clazz = clazz.getSuperclass();
          }
          while (clazz != Object.class);
  
          return fields.values().toArray(new Field[fields.size()]);
  
      }
docs: <p>Return an array of all <code>Field</code>s reflecting declared
  fields in this class, or in any superclass other than
  <code>java.lang.Object</code>.</p>
  
  @param clazz Class to be analyzed