@Override public String buildErrorMessage() { StringBuilder msg = new StringBuilder(160); msg.append("Bean property '").append(getPropertyName()).append( "' is not writable or has an invalid setter method. "); if (!ObjectUtils.isEmpty(getPossibleMatches())) { appendHintMessage(msg); } else { msg.append("Does the parameter type of the setter match the return type of the getter?"); } return msg.toString(); } }
/** * Create PropertyMatches for the given bean property. * @param propertyName the name of the property to find possible matches for * @param beanClass the bean class to search for matches * @param maxDistance the maximum property distance allowed for matches */ public static PropertyMatches forProperty(String propertyName, Class<?> beanClass, int maxDistance) { return new BeanPropertyMatches(propertyName, beanClass, maxDistance); }
@Override public String buildErrorMessage() { StringBuilder msg = new StringBuilder(160); msg.append("Bean property '").append(getPropertyName()).append( "' is not writable or has an invalid setter method. "); if (!ObjectUtils.isEmpty(getPossibleMatches())) { appendHintMessage(msg); } else { msg.append("Does the parameter type of the setter match the return type of the getter?"); } return msg.toString(); } }
public BeanPropertyMatches(String propertyName, Class<?> beanClass, int maxDistance) { super(propertyName, calculateMatches(propertyName, BeanUtils.getPropertyDescriptors(beanClass), maxDistance)); }
public BeanPropertyMatches(String propertyName, Class<?> beanClass, int maxDistance) { super(propertyName, calculateMatches(propertyName, BeanUtils.getPropertyDescriptors(beanClass), maxDistance)); }
/** * Create PropertyMatches for the given bean property. * @param propertyName the name of the property to find possible matches for * @param beanClass the bean class to search for matches * @param maxDistance the maximum property distance allowed for matches */ public static PropertyMatches forProperty(String propertyName, Class<?> beanClass, int maxDistance) { return new BeanPropertyMatches(propertyName, beanClass, maxDistance); }
@Override public String buildErrorMessage() { StringBuilder msg = new StringBuilder(160); msg.append("Bean property '").append(getPropertyName()).append( "' is not writable or has an invalid setter method. "); if (!ObjectUtils.isEmpty(getPossibleMatches())) { appendHintMessage(msg); } else { msg.append("Does the parameter type of the setter match the return type of the getter?"); } return msg.toString(); } }
public BeanPropertyMatches(String propertyName, Class<?> beanClass, int maxDistance) { super(propertyName, calculateMatches(propertyName, BeanUtils.getPropertyDescriptors(beanClass), maxDistance)); }
/** * Create PropertyMatches for the given bean property. * @param propertyName the name of the property to find possible matches for * @param beanClass the bean class to search for matches * @param maxDistance the maximum property distance allowed for matches */ public static PropertyMatches forProperty(String propertyName, Class<?> beanClass, int maxDistance) { return new BeanPropertyMatches(propertyName, beanClass, maxDistance); }