private static boolean isIntrospectable(Class<?> propertyClass) { return propertyClass != Object.class && !propertyClass.isArray() && !propertyClass.isPrimitive() && !propertyClass.isEnum() && !TypeUtils.isString(propertyClass) && !TypeUtils.isNumber(propertyClass) && !TypeUtils.isTemporalOrCalendar(propertyClass) && !TypeUtils.isBoolean(propertyClass) && !Collection.class.isAssignableFrom(propertyClass); }
if (TypeUtils.isBoolean(value.getClass())) { return Boolean.toString((Boolean) value);
/** * Get a suitable {@link BeanProperty} builder according to property type. * @param propertyDescriptor Property descriptor * @param annotations The annotations bound to the bean property * @return {@link BeanProperty} builder */ @SuppressWarnings("unchecked") private static BeanProperty.Builder<?> getPropertyBuilder(PropertyDescriptor propertyDescriptor, Annotation[] annotations) { // check type if (TypeUtils.isString(propertyDescriptor.getPropertyType())) { return StringBeanProperty.builder(propertyDescriptor.getName()); } if (TypeUtils.isBoolean(propertyDescriptor.getPropertyType())) { return BooleanBeanProperty.builder(propertyDescriptor.getName(), propertyDescriptor.getPropertyType().isPrimitive()); } if (TypeUtils.isNumber(propertyDescriptor.getPropertyType())) { return NumericBeanProperty.builder(propertyDescriptor.getName(), (Class<? extends Number>) propertyDescriptor.getPropertyType()); } if (TypeUtils.isDate(propertyDescriptor.getPropertyType()) || TypeUtils.isTemporal(propertyDescriptor.getPropertyType())) { return TemporalBeanProperty.builder(propertyDescriptor.getName(), propertyDescriptor.getPropertyType()); } // default return BeanProperty.builder(propertyDescriptor.getName(), propertyDescriptor.getPropertyType()); }
return (String) value; if (TypeUtils.isBoolean(value.getClass())) { return ((Boolean) value) ? "true" : "false";
if (TypeUtils.isBoolean(type)) { String bv = value.toLowerCase(); if (BOOLEAN_TRUE_VALUES.contains(bv)) {
if (value == null && valueType != null && TypeUtils.isBoolean(valueType)) { valueToPresent = Boolean.FALSE; } else {
/** * Check parameter field type * @param type Field type * @return <code>true</code> if type is admitted as view parameter value */ private static boolean isAdmittedParameterFieldType(Class<?> type) { return TypeUtils.isString(type) || TypeUtils.isNumber(type) || TypeUtils.isBoolean(type) || TypeUtils.isDate(type) || TypeUtils.isLocalTemporal(type) || TypeUtils.isEnum(type); }
if (TypeUtils.isBoolean(type)) {
if (TypeUtils.isBoolean(targetType)) { return Boolean.parseBoolean(value);
if (TypeUtils.isBoolean(valueType)) {
if (TypeUtils.isBoolean(propertyType)) {
if (TypeUtils.isBoolean(propertyType)) {
if (TypeUtils.isBoolean(propertyType)) {