/*
public static BeanRestriction has(String property) {
return new DefaultHas(property);
}
325211
public static Restriction in(String propertyName, Object... values) {
        return new DefaultIn(propertyName, Arrays.asList(values));
    }
234256
public final HasPropertyKind getOwnPropertyKind(String propertyName) {
    return getOwnSlot(propertyName) != null
        ? HasPropertyKind.KNOWN_PRESENT
        : HasPropertyKind.ABSENT;
  }
111846
public static void set(final Object bean, final String property, Object value) {

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

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

                if (subBean == null) {

                    subBean = ClassMockUtils.getPropertyClass(bean.getClass(), firstProperty).newInstance();
                    ClassMockUtils.set(bean, firstProperty, subBean);
                }

                final String newProperty = property.substring(property.indexOf(".") + 1);
                ClassMockUtils.set(subBean, newProperty, value);

                return;
            }

            Method setterMethod = null;

            for (final Method method : bean.getClass().getMethods()) {

                if (method.getName().equals(ClassMockUtils.propertyToSetter(property))) {

                    setterMethod = method;
                    break;
                }
            }

            if (setterMethod != null) {

                final Class<?> type = setterMethod.getParameterTypes()[0];

                if (type == null) {

                    throw new RuntimeException("The setter method of " + property + " does not have a parameter.");

                } else if (type.isArray() && !type.getComponentType().isPrimitive()) {

                    final Object[] array = (Object[]) Array.newInstance(type.getComponentType(), ((Object[]) value).length);

                    for (int i = 0; i < array.length; i++) {

                        array[i] = type.getComponentType().cast(((Object[]) value)[i]);
                    }

                    setterMethod.invoke(bean, new Object[] { array });

                } else {

                    if ((value instanceof String) && ((type == Integer.class) || (type == int.class))) {
                        value = Integer.parseInt((String) value);
                    } else if ((value instanceof String) && ((type == Long.class) || (type == long.class))) {
                        value = Long.parseLong((String) value);
                    } else if ((value instanceof String) && ((type == Byte.class) || (type == byte.class))) {
                        value = Byte.parseByte((String) value);
                    } else if ((value instanceof String) && ((type == Short.class) || (type == short.class))) {
                        value = Short.parseShort((String) value);
                    } else if ((value instanceof String) && ((type == Float.class) || (type == float.class))) {
                        value = Float.parseFloat((String) value);
                    } else if ((value instanceof String) && ((type == Double.class) || (type == double.class))) {
                        value = Double.parseDouble((String) value);
                    } else if ((value instanceof String) && ((type == Boolean.class) || (type == boolean.class))) {
                        value = Boolean.parseBoolean((String) value);
                    }

                    setterMethod.invoke(bean, value);
                }
            }
        } catch (final Exception e) {

            throw new RuntimeException("Can't set property " + property + " in the class " + bean.getClass().getName());
        }
    }
1253222
public static Boolean getBooleanProperty(String base, String property,
			boolean required) {
		return getBooleanProperty(base + JavaPropertyConstants.PROPERTY_DIVIDER
				+ property, required);
	}
326264
public Boolean getAsBoolean(String property) {
		if (super.has(property)) {
			return get(property).getAsBoolean();
		}
		return null;
	}
246657
@NonNull
    public static ValueIndexItem property(@NonNull String property) {
        if (property == null) {
            throw new IllegalArgumentException("property cannot be null.");
        }
        return new ValueIndexItem(Expression.property(property));
    }
247826
public static Object getProperty(Object bean, List<String> propertyPath) {
		Object current = bean;
		for (String propertyName : propertyPath) {
			if (current == null) {
				return null;
			}
			if (current instanceof Iterable) {
				// follow multi-valued property
				List<Object> result = new ArrayList<>();
				Iterable<?> iterable = (Iterable<?>) current;
				for (Object currentElem : iterable) {
					result.add(getProperty(currentElem, propertyName));
				}
				current = result;
			} else {
				// follow single-valued property
				current = getProperty(current, propertyName);
			}
		}
		return current;
	}
192300
public List<T> hasValue(String property, String value) {
		List<T> geoPackages = new ArrayList<>();
		for (PropertiesCoreExtension<T, ?, ?, ?> properties : propertiesMap
				.values()) {
			if (properties.hasValue(property, value)) {
				geoPackages.add(properties.getGeoPackage());
			}
		}
		return geoPackages;
	}
329229
protected void setBeanPropertyValue(final String property, final Object bean,
			final Serializable value) {
		if (bean == null) {
			return;
		}

		if (".".equals(property)) {
			LOG.error("Set of entire bean is not supported by this model");
			return;
		}
		try {
			PropertyUtils.setProperty(bean, property, value);
		} catch (Exception e) {
			LOG.error("Failed to set bean property " + property + " on " + bean, e);
		}
	}
290255
@Override
	public final boolean propertyExists(String name)
    {
        if (name == null || name.length() == 0)
            throw new IllegalArgumentException("Empty property name");
        
        assertDeserializationLevel(MessageSerializationLevel.ALL_HEADERS);
        return propertyMap != null ? propertyMap.containsKey(name) : false;
    }
669778
public static <T> CheckResult<T> checkBean(Object bean) {
        return checkBean(bean, new HashMap<>(ValueConsts.TWO_INT));
    }
555588
public static final Class getType(Object bean, String property)
    {
        return (Class) doFor(bean, property, null, BeanHelper::getObjectType, BeanHelper::getObjectType, BeanHelper::getFieldType, BeanHelper::getMethodType);
    }
846460
protected Set<ConstraintViolation<T>> doValidate(final T object, final String property) {
		if (property == null) {
			final Set<ConstraintViolation<T>> ret = Sets.newHashSet();
			PropertyDescriptor[] propertyDescriptors;
			try {
				propertyDescriptors = Introspector.getBeanInfo(object.getClass()).getPropertyDescriptors();
			}
			catch (IntrospectionException e) {
				throw new IllegalStateException("Could not retrieve property information");
			}
			for (final PropertyDescriptor prop : propertyDescriptors) {
				String propertyName = prop.getName();
				if (formModel.hasValueModel(propertyName) && !ignoredProperties.contains(propertyName)) {
					final Set<ConstraintViolation<T>> result = validator.validateValue(beanClass, propertyName, formModel
							.getValueModel(propertyName).getValue()); //validator.validateProperty(object, propertyName);
					if (result != null) {
						ret.addAll(result);
					}
				}
			}
			return ret;
		}
		else if (!ignoredProperties.contains(property) && formModel.hasValueModel(property)) {
			return validator.validateValue(beanClass, property, formModel
							.getValueModel(property).getValue());
		}
		else {
			return null;
		}
	}
934291
@NonNull
    public static PropertyExpression property(@NonNull String property) {
        if (property == null) {
            throw new IllegalArgumentException("property cannot be null.");
        }
        return new PropertyExpression(property);
    }
1239406
@EachBean(ServiceHttpClientConfiguration.class)
    @Requires(condition = ServiceHttpClientCondition.class)
    DefaultHttpClient serviceHttpClient(
            @Parameter ServiceHttpClientConfiguration configuration,
            @Parameter StaticServiceInstanceList instanceList) {
        List<URI> originalURLs = configuration.getUrls();
        Collection<URI> loadBalancedURIs = instanceList.getLoadBalancedURIs();
        boolean isHealthCheck = configuration.isHealthCheck();

        LoadBalancer loadBalancer = loadBalancerFactory.create(instanceList);

        Optional<String> path = configuration.getPath();
        DefaultHttpClient httpClient;
        if (path.isPresent()) {
            httpClient = beanContext.createBean(DefaultHttpClient.class, loadBalancer, configuration, path.get());
        } else {
            httpClient = beanContext.createBean(DefaultHttpClient.class, loadBalancer, configuration);
        }

        httpClient.setClientIdentifiers(configuration.getServiceId());

        if (isHealthCheck) {
            taskScheduler.scheduleWithFixedDelay(configuration.getHealthCheckInterval(), configuration.getHealthCheckInterval(), () -> Flowable.fromIterable(originalURLs).flatMap(originalURI -> {
                URI healthCheckURI = originalURI.resolve(configuration.getHealthCheckUri());
                return httpClient.exchange(HttpRequest.GET(healthCheckURI)).onErrorResumeNext(throwable -> {
                    if (throwable instanceof HttpClientResponseException) {
                        HttpClientResponseException responseException = (HttpClientResponseException) throwable;
                        HttpResponse response = responseException.getResponse();
                        //noinspection unchecked
                        return Flowable.just(response);
                    }
                    return Flowable.just(HttpResponse.serverError());
                }).map(response -> Collections.singletonMap(originalURI, response.getStatus()));
            }).subscribe(uriToStatusMap -> {
                Map.Entry<URI, HttpStatus> entry = uriToStatusMap.entrySet().iterator().next();

                URI uri = entry.getKey();
                HttpStatus status = entry.getValue();

                if (status.getCode() >= 300) {
                    loadBalancedURIs.remove(uri);
                } else if (!loadBalancedURIs.contains(uri)) {
                    loadBalancedURIs.add(uri);
                }
            }));
        }
        return httpClient;
    }
989838
public boolean isObjectsFieldValueDefault(Object object) throws SQLException {
		Object fieldValue = extractJavaFieldValue(object);
		return isFieldValueDefault(fieldValue);
	}
1313243
public static synchronized String getProperty(String base, String property,
			boolean required) {
		return getProperty(
				base + PropertyConstants.PROPERTY_DIVIDER + property, required);
	}