Gets the value of a property.

@param property The property.
@param object   The object to get the value from (typically an OData entity).
@return The value of the property.
433728
public static Object getPropertyValue(StructuralProperty property, Object object) {
        Field field = property.getJavaField();
        field.setAccessible(true);
        try {
            return field.get(object);
        } catch (IllegalAccessException e) {
            throw new ODataSystemException("Cannot read property: " + property + " of object: " + object, e);
        }
    }
328599
public static function getProperty($object, string $property)
    {
        $getter = \Closure::bind(
            function ($object) use ($property) {
                return $object->{$property};
            },
            null,
            get_class($object)
        );

        return $getter($object);
    }
704694
@Override
    public Object getPropertyValue(PropertyInfo propInfo) throws Exception {
        Object obj = registeredProperties == null ? null : registeredProperties.get(propInfo.getId());

        if (obj instanceof PropertyProxy) {
            Object value = ((PropertyProxy) obj).getValue();
            return value instanceof String ? propInfo.getPropertyType().getSerializer().deserialize((String) value) : value;
        } else {
            return obj == null ? null : propInfo.getPropertyValue(obj, obj == this);
        }
    }
554532
public String getValue(String property, String language) {
        Multimap<Optional<String>, String> values = properties.get(property);

        if (values == null) {
            return null;
        }

        Iterator<String> it = values.get(Optional.of(language)).iterator();
        return it.hasNext() ? it.next() : null;
    }
762627
@SuppressWarnings("unchecked")
    private static Object getIndexedValue(Object obj, Property property, int index, ObjectWrapper options) {
        if (property == null) {
            throw new IllegalArgumentException("Cannot get the indexed value from 'null' property.");
        }

        Object propertyValue = property.get(obj);

        if (propertyValue == null) {
            throw new NullPointerException("Invalid 'null' value found for indexed '" + property + "' in "
                                                   + obj.getClass().getName() + ".");

        }

        if (propertyValue instanceof List) {
            List list = (List) propertyValue;
            int size = list.size();

            if (size < index) {
                if (options.isOutOfBoundsSafety) {
                    return null;
                } else {
                    throw new IndexOutOfBoundsException("The indexed " + property + " in "
                                                                + obj.getClass().getSimpleName() + " object has only '" + size + "' elements," +
                                                                " but index '" + index + "' requested.");
                }
            }

            return list.get(index);
        } else if (propertyValue.getClass().isArray()) {
            int lenght = Array.getLength(propertyValue);

            if (lenght < index && options.isOutOfBoundsSafety) {
                return null;
            }

            try {
                return Array.get(propertyValue, index);
            } catch (ArrayIndexOutOfBoundsException e) {
                throw new IndexOutOfBoundsException("The indexed " + property + " in "
                                                            + obj.getClass().getSimpleName() + " object has only '" + lenght + "' elements," +
                                                            " but index '" + index + "' requested.");

            }
        } else if (propertyValue instanceof Iterable) {
            Iterable iterable = (Iterable) propertyValue;

            int k = 0;
            for (Object object : iterable) {
                if (k == index) {
                    return object;
                }

                k++;// Hopefully not an infinite iteration
            }

            // Nothing found
            if (options.isOutOfBoundsSafety) {
                return null;
            } else {
                throw new IndexOutOfBoundsException("The indexed " + property + " in "
                                                            + obj.getClass().getSimpleName() + " object has less than '" + index + "'" +
                                                            " elements.");
            }
        } else {
            throw new IllegalArgumentException("Cannot get an indexed value from the not indexed " + property
                                                       + ". Only List, array and Iterable types are supported, but " + property.getType().getSimpleName()
                                                       + " found.");
        }
    }
799197
public static Object getPropertyValue( final Object root, final String... properties ) {



        Object object = root;



        for ( String property : properties ) {

            if (object == null) {
                return null;
            }

            if (property.equals("this")) {
                if (!(object instanceof Map)) {
                    continue;
                } else {
                    Object aThis = ((Map) object).get("this");
                    if (aThis!=null) {
                        object = aThis;
                        continue;
                    } else {
                        continue;
                    }
                }
            }

            if (object instanceof Map) {
                object = ((Map) object).get(property);
                continue;
            }


            char c = property.charAt(0);
            if ( CharScanner.isDigit(c) ) {
                /* We can index numbers and names. */
                object = idx ( object, StringScanner.parseInt ( property ) );

            } else {


                if (object instanceof Collection) {

                    object = _getFieldValuesFromCollectionOrArray( object, property);
                    continue;
                } else if (isArray(object)) {


                    Iterator iter = Conversions.iterator(object);
                    List list = Lists.list(iter);
                    object = _getFieldValuesFromCollectionOrArray(list, property);

                    continue;
                }


                Map<String, FieldAccess> fields =
                         getPropertyFieldAccessMap( object.getClass() );

                FieldAccess field = fields.get( property );

                if ( field == null ) {
                    return null;
                }

                object = field.getValue( object );
            }
        }
        return object;
    }
347188
@Override
  public Object getValue(ELContext context, Object base, Object property) {
    return getValue(context, base, property, true);
  }
570730
@Override
    public Object getValue(Object instance, String propertyName) {
        PropertyAccessor accessor = PropertyProxyUtils.getPropertyAccessor(this.conversionService, this.useDirectFieldAccess, instance);
        Object value = accessor.getPropertyValue(propertyName);
        if(log.isDebugEnabled()) {
            getType(instance, propertyName);
            log.debug("Actual type of value for property '"+propertyName+"' on instance "+instance+" is "+(value != null ? value.getClass() : null));
        }
        
        TypeDescriptor targetType = accessor.getPropertyTypeDescriptor(propertyName);
        TypeDescriptor sourceType = value == null ? targetType : TypeDescriptor.valueOf(value.getClass());
        if (this.conversionService.canConvert(sourceType, targetType)) {
            value = this.conversionService.convert(value, sourceType, targetType);
        }
        return value;
    }
1242959
public static <T> T getValue( Object object, String name )
	{
		return propertyValues.getValue(object, name);
	}
588959
public static function fetchProperty($object, $property)
    {
        $refl = new \ReflectionObject($object);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);

        return $prop->getValue($object);
    }
1118040
public PropertyIdValue copy(PropertyIdValue object) {
		return dataObjectFactory.getPropertyIdValue(object.getId(), object.getSiteIri());
	}
873561
function getValue(object, prop) {
  if (!(object && object[prop])) {
    return null;
  }
  return _.isFunction(object[prop]) ? object[prop]() : object[prop];
}
883130
public Object getAsRaw(String property) {
		if (super.has(property)) {
			return get(property).getAsRaw();
		}
		return null;
	}
907007
private function getValue($object, \ReflectionProperty $property)
    {
        $value = null;

        if ($property->isPublic()) {
            $value = $property->getValue($object);
        } else {
            // Try to use accessor if property is not public
            $accessorName = $this->formatter->getPhpAccessor($property->getName(), false);
            $reflectedObject = new \ReflectionObject($object);
            $reflectedMethod = $reflectedObject->getMethod($accessorName);

            if (null !== $reflectedMethod) {
                $value = $reflectedMethod->invoke($object);
            }
        }

        return $value;
    }
739703
public Object getValue(Object object) throws IllegalAccessException, InvocationTargetException {
        Object result = null;
        if (getter != null) {
            result = getter.invoke(object);
        } else if (field != null) {
            if(!field.isAccessible()){
                field.setAccessible(true);
            }
            result = field.get(object);
        }
        return result;
    }
481403
private function getPropertyValue(ReflectionClass $reflection, $property, $object)
    {
        $propertyReflection = $this->accessProperty($reflection, $property);
        $value = $propertyReflection->getValue($object);
        $propertyReflection->setAccessible(false);

        return $value;
    }
937860
public String getValue(String property) {
		String value = null;
		List<String> values = getValues(property);
		if (!values.isEmpty()) {
			value = values.get(0);
		}
		return value;
	}