code: protected HashMap getFieldMap(Class cl)
      {
          HashMap fieldMap = new HashMap();
  
          for (; cl != null; cl = cl.getSuperclass()) {
              Field[] fields = cl.getDeclaredFields();
              for (int i = 0; i < fields.length; i++) {
                  Field field = fields[i];
  
                  if (Modifier.isTransient(field.getModifiers()) ||
                      Modifier.isStatic(field.getModifiers()))
                      continue;
  
                  // XXX: could parameterize the handler to only deal with public
                  field.setAccessible(true);
  
                  fieldMap.put(field.getName(), field);
              }
          }
  
          return fieldMap;
      }
docs: Creates a map of the classes fields.