Class PropertyAccessorUtils
java.lang.Object
org.springframework.beans.PropertyAccessorUtils
@Deprecated(since="7.1",
forRemoval=true)
public abstract class PropertyAccessorUtils
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Utility methods for classes that perform bean property access
according to the
PropertyAccessor interface.- Since:
- 1.2.6
- Author:
- Juergen Hoeller, Sam Brannen
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcanonicalPropertyName(@Nullable String propertyName) Deprecated, for removal: This API element is subject to removal in a future version.Determine the canonical name for the given property path.canonicalPropertyNames(String @Nullable [] propertyNames) Deprecated, for removal: This API element is subject to removal in a future version.Determine the canonical names for the given property paths.static intgetFirstNestedPropertySeparatorIndex(String propertyPath) Deprecated, for removal: This API element is subject to removal in a future version.Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]").static intgetLastNestedPropertySeparatorIndex(String propertyPath) Deprecated, for removal: This API element is subject to removal in a future version.Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]").static StringgetPropertyName(String propertyPath) Deprecated, for removal: This API element is subject to removal in a future version.Return the actual property name for the given property path.static booleanisNestedOrIndexedProperty(@Nullable String propertyPath) Deprecated, for removal: This API element is subject to removal in a future version.Check whether the given property path indicates an indexed or nested property.static booleanmatchesProperty(String registeredPath, String propertyPath) Deprecated, for removal: This API element is subject to removal in a future version.Determine whether the given registered path matches the given property path, either indicating the property itself or an indexed element of the property.
-
Constructor Details
-
PropertyAccessorUtils
public PropertyAccessorUtils()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getPropertyName
Deprecated, for removal: This API element is subject to removal in a future version.Return the actual property name for the given property path.- Parameters:
propertyPath- the property path to determine the property name for (can include property keys, for example for specifying a map entry)- Returns:
- the actual property name, without any key elements
-
isNestedOrIndexedProperty
Deprecated, for removal: This API element is subject to removal in a future version.Check whether the given property path indicates an indexed or nested property.- Parameters:
propertyPath- the property path to check- Returns:
- whether the path indicates an indexed or nested property
-
getFirstNestedPropertySeparatorIndex
Deprecated, for removal: This API element is subject to removal in a future version.Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]").- Parameters:
propertyPath- the property path to check- Returns:
- the index of the nested property separator, or -1 if none
-
getLastNestedPropertySeparatorIndex
Deprecated, for removal: This API element is subject to removal in a future version.Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]").- Parameters:
propertyPath- the property path to check- Returns:
- the index of the nested property separator, or -1 if none
-
matchesProperty
Deprecated, for removal: This API element is subject to removal in a future version.Determine whether the given registered path matches the given property path, either indicating the property itself or an indexed element of the property.- Parameters:
registeredPath- the registered path (potentially with index)propertyPath- the property path (typically without index)- Returns:
- whether the paths match
-
canonicalPropertyName
Deprecated, for removal: This API element is subject to removal in a future version.Determine the canonical name for the given property path. Removes surrounding quotes from map keys:
map['key']→map[key]
map["key"]→map[key]- Parameters:
propertyName- the bean property path- Returns:
- the canonical representation of the property path
-
canonicalPropertyNames
Deprecated, for removal: This API element is subject to removal in a future version.Determine the canonical names for the given property paths.- Parameters:
propertyNames- the bean property paths (as array)- Returns:
- the canonical representation of the property paths (as array of the same size)
- See Also:
-
PropertyPath. UsePropertyPath.parse(String)andPropertyPath.canonicalName()in place ofcanonicalPropertyName(String)andcanonicalPropertyNames(String[]), and match a registered path against a property by comparing canonical names in place ofmatchesProperty(String, String). There is no direct replacement forgetPropertyName(String),isNestedOrIndexedProperty(String),getFirstNestedPropertySeparatorIndex(String), orgetLastNestedPropertySeparatorIndex(String), which operate on raw, unparsed property path text.