code: public static Field findField(Class<?> type, String fieldName ) {
          while( type != null ) {
              Field[] fields = type.getDeclaredFields();
              for( Field field: fields ) {
                  if( field.getName().equals(fieldName) )
                      return field;
              }
              type = type.getSuperclass();
          }
          return null;
      }
docs: Find the field with the given name in the class.  Will inspect all fields, independent
  of access level.
  @param type Class in which to search for the given field.
  @param fieldName Name of the field for which to search.
  @return The field, or null if no such field exists.