code: @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;
  		}
  	}
docs: <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.