code: public static Field findClassField(Class<?> beanClass, String fieldName) {
  		Class<?> currentClass = beanClass;
  		while (currentClass != null && currentClass != Object.class) {
  			for (Field field : currentClass.getDeclaredFields()) {
  				if (field.isSynthetic()) {
  					continue;
  				}
  
  				if (field.getName().equals(fieldName)) {
  					return field;
  				}
  			}
  			currentClass = currentClass.getSuperclass();
  		}
  
  		return null;
  	}
docs: Tries to find a class fields. Supports inheritance and doesn't return synthetic fields.
  
  @param beanClass class to be searched for
  @param fieldName field name
  @return a list of found fields