/** * Get the last component of the path. Also works if not nested. * @param pa property accessor to work on * @param nestedPath property path we know is nested * @return last component of the path (the property on the target bean) */ protected String getFinalPath(AbstractNestablePropertyAccessor pa, String nestedPath) { if (pa == this) { return nestedPath; } return nestedPath.substring(PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(nestedPath) + 1); }
/** * Get the last component of the path. Also works if not nested. * @param pa property accessor to work on * @param nestedPath property path we know is nested * @return last component of the path (the property on the target bean) */ protected String getFinalPath(AbstractNestablePropertyAccessor pa, String nestedPath) { if (pa == this) { return nestedPath; } return nestedPath.substring(PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(nestedPath) + 1); }
/** * Get the last component of the path. Also works if not nested. * @param bw BeanWrapper to work on * @param nestedPath property path we know is nested * @return last component of the path (the property on the target bean) */ private String getFinalPath(BeanWrapper bw, String nestedPath) { if (bw == this) { return nestedPath; } return nestedPath.substring(PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(nestedPath) + 1); }
/** * Get the last component of the path. Also works if not nested. * @param pa property accessor to work on * @param nestedPath property path we know is nested * @return last component of the path (the property on the target bean) */ protected String getFinalPath(AbstractNestablePropertyAccessor pa, String nestedPath) { if (pa == this) { return nestedPath; } return nestedPath.substring(PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(nestedPath) + 1); }
/** * Get the last component of the path. Also works if not nested. * @param bw BeanWrapper to work on * @param nestedPath property path we know is nested * @return last component of the path (the property on the target bean) */ private String getFinalPath(BeanWrapper bw, String nestedPath) { if (bw == this) { return nestedPath; } return nestedPath.substring(PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(nestedPath) + 1); }
/** * Get the last component of the path. Also works if not nested. * @param bw BeanWrapper to work on * @param nestedPath property path we know is nested * @return last component of the path (the property on the target bean) */ private String getFinalPath(BeanWrapper bw, String nestedPath) { if (bw == this) { return nestedPath; } return nestedPath.substring(PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(nestedPath) + 1); }
/** * <p>Constructor for PropertyPath.</p> * * @param nestedPath a {@link java.lang.String} object. */ public PropertyPath(String nestedPath) { String canonicalPath = PropertyAccessorUtils.canonicalPropertyName(nestedPath); int lastIndex = PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(canonicalPath); if (lastIndex < 0) { propertyName = PropertyAccessorUtils.getPropertyName(canonicalPath); key = computeKey(canonicalPath); } else { parent = new PropertyPath(canonicalPath.substring(0, lastIndex)); String lastProperty = canonicalPath.substring(lastIndex+1); propertyName = PropertyAccessorUtils.getPropertyName(lastProperty); key = computeKey(lastProperty); } }