<p>
getValueOf.
</p>

@param field
a {@link java.lang.reflect.Field} object.
@param valueType
a {@link java.lang.Class} object.
@param <T>
a T object.
@return a T object.
187871
@SuppressWarnings("unchecked")
	public static <T> T getValueOf(Field field, Object reference, Class<?> referenceClazz, Class<T> valueType) {
		try {
			field.setAccessible(true);
			Object toReturn = (T) field.get(reference);
			if (String.class.isInstance(valueType.getClass()) && !String.class.isInstance(toReturn.getClass())) {
				toReturn = toReturn.toString();
			}
			return (T) toReturn;
		} catch (Exception e) {
			log.warning(e.getClass().getSimpleName() + ": " + e.getMessage());
			return null;
		}
	}
807102
protected Object getValue(Object einstance, Field field) {
        return getNestedProperty(einstance, field.getProperty());
    }
657880
private Object getFieldValue(Field field) {
        try {
            field.setAccessible(true);
            return field.get(this);
        } catch (IllegalArgumentException | IllegalAccessException e) {
            LOGGER.error("Can't access to field value", e);
            return null;
        }
    }
871967
public static <A extends Annotation> A getAnnotation(Field field, Class<A> annotationType) {
        if (field == null || annotationType == null) {
            return null;
        }

        return field.getAnnotation(annotationType);
    }
186773
private String getFieldType(IndexSchema schema, String field)
      throws IOException {
    SchemaField sf = schema.getField(field);
    FieldType ft = sf.getType();
    if (ft != null) {
      if (ft.isPointField() && !sf.hasDocValues()) {
        return ComponentFacet.TYPE_POINTFIELD_WITHOUT_DOCVALUES;
      }
      NumberType nt = ft.getNumberType();
      if (nt != null) {
        return nt.name();
      } else {
        return ComponentFacet.TYPE_STRING;
      }
    } else {
      // best guess
      return ComponentFacet.TYPE_STRING;
    }
  }
954076
public static Object getValue(Field field, Object object) {
		String fieldName = field.getName();
		String setMethodName = "get" + firstLetterUpperCase(fieldName);
		Method method = null;
		try {
			method = object.getClass().getMethod(setMethodName);
		} catch (Exception e) {
		}
		
		if(method != null) {
			try {
				return method.invoke(object);
			} catch (Exception e) {
				LOGGER.error("method invoke", e);
			}
		}
		
		field.setAccessible(true);
		try {
			return field.get(object);
		} catch (Exception e) {
			LOGGER.error("method invoke", e);
			return null;
		}
	}
883971
public static <T> T getFieldValue(final Object obj, final Field field) {
		try {
			return (T) field.get(obj);
		} catch (Exception e) {
			throw convertReflectionExceptionToUnchecked(e);
		}
	}
538831
private static void typeCheckFieldSet(Field field, Class<?> valueType, Object value) throws IllegalAccessException {
		if (!isPrimitive(valueType)) {
			//Call the version of this method that considers autoboxing
			typeCheckFieldSet(field, value);
		}
		else {
			//Value type is primitive.
			//  Note: In this case value was a primitive value that became boxed, so it can't be null.
			Class<?> fieldType = field.getType();
			if (!Utils.isConvertableFrom(fieldType, valueType)) {
				throw Exceptions.illegalSetFieldTypeException(field, valueType, value);
			}
		}
	}
626647
public static JavaType of(final Class<?> implementClass, final Field field) {
		return of(new ImplementClass(implementClass), field);
	}
752924
public Object getFieldActualValue(final String field) {
        final String fieldPath = buildFieldPath(field);
        return propertyValueNavigator.getProperty(target, fieldPath);
    }
762568
public static JsonObject getObject(JsonObject object, String field) {
        final JsonValue value = object.get(field);
        throwExceptionIfNull(value, field);
        return value.asObject();
    }
666322
private Object resolvePropertyTypedValue(FieldData field) {
        Object value;
        if (field.metaData.isInstantiableCollectionType()) {
            value = getArrayPropertyAsCollection(field);
        } else {
            value = resolvePropertyTypedValue(field, field.metaData.getType());
        }
        return value;
    }
704618
public static Object getFieldValue(Object candidate, Field field) {
        try {
            return ReflectUtils.getValue(ReflectUtils.makeAccessible(field), candidate);
        } catch (Exception e) {
            throw BusinessException.wrap(e, BusinessErrorCode.ERROR_ACCESSING_FIELD)
                    .put("className", candidate.getClass())
                    .put("fieldName", field.getName());
        }
    }
15563
public static Object getFieldValue(Object object, String fieldName) {
        try {
            return getDeclaredFieldInHierarchy(object.getClass(), fieldName).get(object);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
874690
private String parseValue(String fieldType, Object value) {
		if (TypeConver.isBasicType(fieldType)) {
			if (value != null) {
				return value.toString();
			} else {
				return null;
			}
		}
		return null;
	}
851142
<T extends ValueDescriptor<?>> T getValueDescriptor(Class<T> valueDescriptorType) {
        return scannerContext.getStore().create(valueDescriptorType);
    }
960224
public PropertyType getPropertyType(String field) {
        if(propertyTypes==null)
            propertyTypes = buildPropertyTypes(clazz);
        return propertyTypes.get(field);
    }