code: public static String getFieldNameByType(Class<?> classType, Class<?> fieldType) {
  		Field[] declaredFields = classType.getDeclaredFields();
  		for (Field field : declaredFields) {
  			if (field.getType().isAssignableFrom(fieldType)) {
  				return field.getName();
  			}
  		}
  		if (classType.getSuperclass() != null) {
  			return getFieldNameByType(classType.getSuperclass(), fieldType);
  		}
  		return null;
  	}
docs: Gets the field name by type.
  
  @param classType the class type
  @param fieldType the field type
  @return the field name by type