Gets the value of a given property into a given bean.

@param <Q>
the bean type.
@param bean
the bean itself.
@param propertyName
the property name.

@return the property value.

@see #getPropertyValue(Object, String, Class)
518233
public static <Q> Object getPropertyValue(Q bean, String propertyName) {

        return ObjectUtils.getPropertyValue(bean, propertyName, Object.class);
    }
690492
public static Object getProperty(Object bean, String expression) {
		return BeanPath.create(expression).get(bean);
	}
60447
@SuppressWarnings({ "unchecked", "rawtypes" })
	protected Object readBean(Object bean) {
		log.debug("readBean: {}", bean);
		storeReference(bean);
		Class theClass = bean.getClass();
		while (hasMoreProperties()) {
			String name = readPropertyName();
			Type type = getPropertyType(bean, name);
			log.debug("property: {} type: {}", name, type);
			Object property = Deserializer.deserialize(this, type);
			log.debug("val: {}", property);
			// log.debug("val: "+property.getClass().getName());
			if (property != null) {
				try {
					if (type instanceof Class) {
						Class t = (Class) type;
						if (!t.isAssignableFrom(property.getClass())) {
							property = ConversionUtils.convert(property, t);
						}
					}
					final Field field = theClass.getField(name);
					field.set(bean, property);
				} catch (Exception ex2) {
					try {
						BeanUtils.setProperty(bean, name, property);
					} catch (Exception ex) {
						log.error("Error mapping property: {} ({})", name,
								property);
					}
				}
			} else {
				log.debug("Skipping null property: {}", name);
			}
			if (hasMoreProperties()) {
				skipPropertySeparator();
			} else {
				break; // hasMoreProperties == false, position moved to +3
			}
		}
		return bean;
	}
207450
@SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"})
    @Nullable
    public <T> T getProperty(String name) {
        return (T) config.getProperties().get(name);
    }
769452
public static final Set<String> getProperties(Object bean)
    {
        return stream(bean).collect(Collectors.toSet());
    }
1209769
<T> T getValue( Object object, String name )
	{
		T result = getPropertyImpl( object, name );
		if( result instanceof Property )
		{
			@SuppressWarnings( "unchecked" )
			Property<T> property = ((Property<T>) result);
			return property.getValue();
		}

		return result;
	}
3407
@SuppressWarnings("rawtypes")
public static Object getMappedProperty(Object bean, String name, String key)
       throws IllegalAccessException, InvocationTargetException, NoSuchMethodException,Exception
   {
       if(bean == null)
           throw new IllegalArgumentException("No bean specified");
       if(name == null)
           throw new IllegalArgumentException("No name specified");
       if(key == null)
           throw new IllegalArgumentException("No key specified");
       
       Object result = null;
       PropertyDescriptor descriptor = getPropertyDescriptor(bean, name);
       if(descriptor == null)
           throw new NoSuchMethodException("Unknown property '" + name + "'");
       if(descriptor instanceof JBPropertyDescriber)
       {
           Method readMethod = ((JBPropertyDescriber)descriptor).getMappedReadMethod();
           if(readMethod != null)
           {
               Object keyArray[] = new Object[1];
               keyArray[0] = key;
               result = readMethod.invoke(bean, keyArray);
           } else
           {
               throw new NoSuchMethodException("Property '" + name + "' has no mapped getter method");
           }
       } else
       {
           Method readMethod = descriptor.getReadMethod();
           if(readMethod != null)
           {
               Object invokeResult = readMethod.invoke(bean, new Object[0]);
               if(invokeResult instanceof Map)
                   result = ((Map)invokeResult).get(key);
           } else
           {
               throw new NoSuchMethodException("Property '" + name + "' has no mapped getter method");
           }
       }
       return result;
   }
211180
public static <T> T getProperty(Object bean, String name, Class<T> clazz) throws Exception {
        Method method = ReflectUtils.getPropertyGetterMethod(bean.getClass(), name);
        if (method.isAccessible()) {
            return (T) method.invoke(bean);
        } else {
            try {
                method.setAccessible(true);
                return (T) method.invoke(bean);
            } finally {
                method.setAccessible(false);
            }
        }
    }
38716
public static Object get(final Object bean, final String property) {

        try {
            if (property.indexOf(".") >= 0) {

                final Object subBean = ClassMockUtils.get(bean, property.substring(0, property.indexOf(".")));

                if (subBean == null) {

                    return null;
                }

                final String newProperty = property.substring(property.indexOf(".") + 1);

                return ClassMockUtils.get(subBean, newProperty);
            }

            Method method = null;

            try {
                method = bean.getClass().getMethod(ClassMockUtils.propertyToGetter(property), new Class[] {});
            } catch (final NoSuchMethodException e) {
                method = bean.getClass().getMethod(ClassMockUtils.propertyToGetter(property, true), new Class[] {});
            }

            return method.invoke(bean, new Object[] {});

        } catch (final Exception e) {

            throw new RuntimeException("Can't get property " + property + " in the class " + bean.getClass().getName(), e);
        }
    }
97883
@Override
    @SuppressWarnings("unchecked")
    public P get(Bean bean) {
        return (P) getter.get(bean);
    }
1298315
public String findProperty( final String propertyName )
    {
        String value = null;
        if( m_properties != null )
        {
            value = (String) m_properties.get( propertyName );
        }
        if( value != null && value.trim().length() == 0 )
        {
            value = null;
        }
        return value;
    }
442463
public static String getProperty(String propertyName, String defaultValue) {
        String value = get(propertyName);
        return value == null ? defaultValue : value;
    }
614459
public static String getProperty(Object bean, String field) {
        Object property = PropertyUtils.getProperty(bean, field);
        if (property == null) {
            return "null";
        }

        return property.toString();
    }
102049
public static final boolean hasProperty(Object bean, String property)
    {
        try
        {
            return (boolean) doFor(
                bean, 
                property, 
                null,
                (Object a, int i)->{return true;},
                (List l, int i)->{return true;},
                (Object b, Class c, String p)->{getField(c, p);return true;}, 
                (Object b, Method m)->{return true;});
        }
        catch (BeanHelperException ex)
        {
            return false;
        }
    }
1209115
protected final Object beanLookup(Object value, Object propertyName) {
        LOGGER.trace("get JavaBean property : " + propertyName);
        return ParseUtils.getProperty(value, propertyName.toString(), PROPERTY_CACHE);
    }
425415
public function getProperty($propertyName)
    {
        $className = $className = $this->getClass()->getName();

        if ($this->hasProperty($propertyName) === true) {

            try {
                return new BeanProperty($className, $propertyName);
            } catch (BeanException $e) {
                $msg = "The bean property with name '${propertyName}' in class '${className}' could not be retrieved.";
                throw new BeanException($msg, BeanException::NO_PROPERTY, $e);
            }
        } else {
            $msg = "No bean property with name '${propertyName}' in class '${className}'.";
            throw new BeanException($msg, BeanException::NO_PROPERTY);
        }
    }
199680
public static String[][] getProperties(final Bean bean) {
        final List<String> propertyNames = bean.getPropertyNames();
        final int psize = propertyNames.size();
        final String[][] properties = new String[psize][];
        for (int i = 0; i < psize; i++) {
            final String propertyName = propertyNames.get(i);
            final List<String> values = bean.getValues(propertyName);
            final int vsize = values.size();
            properties[i] = new String[vsize + 1];
            properties[i][0] = propertyName;
            for (int j = 0; j < vsize; j++) {
                properties[i][j + 1] = values.get(j);
            }
        }
        return properties;
    }