spring-framework / org.springframework.beans / PropertyAccessorUtils

PropertyAccessorUtils

abstract class PropertyAccessorUtils

Utility methods for classes that perform bean property access according to the PropertyAccessor interface.

Author
Juergen Hoeller

Since
1.2.6

Constructors

<init>

PropertyAccessorUtils()

Utility methods for classes that perform bean property access according to the PropertyAccessor interface.

Functions

canonicalPropertyName

open static fun canonicalPropertyName(propertyName: String): String

Determine the canonical name for the given property path. Removes surrounding quotes from map keys: map['key'] -> map[key] map["key"] -> map[key]

canonicalPropertyNames

open static fun canonicalPropertyNames(propertyNames: Array<String>): Array<String>

Determine the canonical names for the given property paths.

getFirstNestedPropertySeparatorIndex

open static fun getFirstNestedPropertySeparatorIndex(propertyPath: String): Int

Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]").

getLastNestedPropertySeparatorIndex

open static fun getLastNestedPropertySeparatorIndex(propertyPath: String): Int

Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]").

getPropertyName

open static fun getPropertyName(propertyPath: String): String

Return the actual property name for the given property path.

isNestedOrIndexedProperty

open static fun isNestedOrIndexedProperty(propertyPath: String): Boolean

Check whether the given property path indicates an indexed or nested property.

matchesProperty

open static fun matchesProperty(registeredPath: String, propertyPath: String): Boolean

Determine whether the given registered path matches the given property path, either indicating the property itself or an indexed element of the property.