/* (non-Javadoc)
@see nz.co.senanque.validationengine.ProxyField#fetchValue()
767776
public Object fetchValue()
    {
        try
        {
            return m_propertyMetadata.getGetMethod().invoke(m_proxyObject.getObject());
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
    }
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;
        }
    }
279067
private static Object getValue(final Object o, final Field f) {
        try {
            f.setAccessible(true);
            return f.get(o);
        } catch (final IllegalArgumentException e) {
            LOGGER.error("failure accessing field value {}", new Object[] { f.getName(), e });
        } catch (final IllegalAccessException e) {
            LOGGER.error("failure accessing field value {}", new Object[] { f.getName(), e });
        }
        return null;
    }
1155282
@Override
    public Object getValue(String paramName) throws IllegalArgumentException {
        if (!hasValue(paramName)) {
            throw new IllegalArgumentException("Can't find criteria with name " + paramName);
        }
        if (LIMIT_NAME.equals(paramName)) {
            return limit;
        }
        if (OFFSET_NAME.equals(paramName)) {
            return offset;
        }
        return criterias.get(paramName).getValue();
    }
347188
@Override
  public Object getValue(ELContext context, Object base, Object property) {
    return getValue(context, base, property, true);
  }
59197
@Override
  public String getValue() {
    String retVal = super.getValue();
    if (retVal == null && myHaveComponentParts) {

      if (determineLocalPrefix(myBaseUrl) != null && myResourceType == null && myUnqualifiedVersionId == null) {
        return myBaseUrl + myUnqualifiedId;
      }

      StringBuilder b = new StringBuilder();
      if (isNotBlank(myBaseUrl)) {
        b.append(myBaseUrl);
        if (myBaseUrl.charAt(myBaseUrl.length() - 1) != '/') {
          b.append('/');
        }
      }

      if (isNotBlank(myResourceType)) {
        b.append(myResourceType);
      }

      if (b.length() > 0 && isNotBlank(myUnqualifiedId)) {
        b.append('/');
      }

      if (isNotBlank(myUnqualifiedId)) {
        b.append(myUnqualifiedId);
      } else if (isNotBlank(myUnqualifiedVersionId)) {
        b.append('/');
      }

      if (isNotBlank(myUnqualifiedVersionId)) {
        b.append('/');
        b.append("_history");
        b.append('/');
        b.append(myUnqualifiedVersionId);
      }
      retVal = b.toString();
      super.setValue(retVal);
    }
    return retVal;
  }
746274
@Override
    public final T get() {
        T value = super.get();
        if (null != value) addValue();
        return value;
    }
1178141
public static Object getValue(Object obj, String field) {
        Method getter = getGetterMethod(obj.getClass(), field);

        try {
            return getter.invoke(obj);
        } catch (IllegalAccessException | InvocationTargetException e) {
            return null;
        }
    }
214841
public Object getValue(ELContext context)
    {
        Object base = this.orig.getValue(context);
        if (base != null)
        {
            context.setPropertyResolved(true);
            return new Entry((Map) base, key);

        }
        return null;
    }
659585
private void fetch() {
    	next.clear();
        // We need to remember for what thread the IEnumVARIANT was marshaled. Because if we want to interpret this
        // VARIANT as an interface pointer later on, we need to do this in the same thread!
        next.thread = e.getComThread();
        int r = e.next(1,next);
        if(r==0) {
            next = null;
            e.dispose();
        }
    }
789062
public static <T> T getValueOf(String fieldName, Object reference, Class<?> referenceClazz, Class<T> valueType) {
		try {
			Field field = referenceClazz.getDeclaredField(fieldName);
			field.setAccessible(true);

			@SuppressWarnings("unchecked")
			T toReturn = (T) field.get(reference);
			return toReturn;
		} catch (Exception e) {
			log.warning(e.getClass().getSimpleName() + ": " + e.getMessage());
			return null;
		}
	}
854877
public void updateValue()
    {
        try
        {
            Method method = m_propertyMetadata.getSetMethod();
            //Object convertedValue = ValidationUtils.convertTo(getClazz(), m_currentValue);
            if (m_currentValue == null && method.getParameterTypes()[0].isPrimitive())
            {
                method.invoke(m_proxyObject.getObject(), ConvertUtils.getPrimitiveTypeForNull(method.getParameterTypes()[0]));
            }
            else
            {
                method.invoke(m_proxyObject.getObject(), m_currentValue);
            }
            m_useCurrentValue = false;
            m_notKnown = false;
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
    }
399320
public static final Object getValue(Object obj, String fieldName) {
        try {
            return getField(obj.getClass(), fieldName).get(obj);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
1027499
@Override
    public String getValue() throws WidgetException {
        try {
            return getSelectedOption();
        } catch (Exception e) {
            throw new WidgetException("Error while getting dropdown value", getByLocator(), e);
        }
    }
73000
public Object getFieldValue(String fieldName) throws ReflectorException {
		if(object == null) {
			logger.error("object is null: did you specify it using the 'inspect()' method?");
			throw new ReflectorException("object is null: did you specify it using the 'inspect()' method?");
		}
		if(!Strings.isValid(fieldName)) {
			logger.error("field name is null or not valid");
			throw new ReflectorException("field name is null or not valid");
		}
		
		Object result = null;
		String name = fieldName.trim();
		if(useGetters) {
			logger.trace("accessing value using getter");
			String methodName = "get" + Character.toUpperCase(name.charAt(0)) + name.substring(1);			
			result = invoke(methodName);
		} else {
			logger.trace("accessing value through direct field access");
			Field field = null;			
			boolean needReprotect = false;
			try {
				field = object.getClass().getDeclaredField(name);				
				if(accessPrivateMembers) {
					needReprotect = unprotect(field);
				}
				result = field.get(object);
			} catch (Exception e) {
				String message = "error accessing field '" + fieldName + "'"; 
				logger.error(message, e);
				throw new ReflectorException(message, e);
			} finally {
				if(needReprotect) {				
					protect(field);
				}
			}
		}
		return result;		
	}
220555
public FieldValue get(String name) {
    if (schema == null) {
      throw new UnsupportedOperationException(
          "Retrieving field value by name is not supported when there is no fields schema provided");
    }
    return get(schema.getIndex(name));
  }