code: static Field getField(Class<?> targetClass, String fieldName) {
  		while (targetClass != null) {
  			try {
  				Field field = targetClass.getDeclaredField(fieldName);
  				logger.debug("Found field {} in class {}", fieldName, targetClass.getName());
  				return field;
  			} catch (NoSuchFieldException e) {
  				logger.debug("Failed to find field {} in class {}", fieldName, targetClass.getName());
  			}
  			targetClass = targetClass.getSuperclass();
  		}
  
  		return null;
  	}
docs: Get field with the specified name.
  @param targetClass class for which a field will be returned
  @param fieldName name of the field that should be returned
  @return field with the specified name if one exists, null otherwise