|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.PropertyAccessorUtils
public abstract class PropertyAccessorUtils
Utility methods for classes that perform bean property access
according to the PropertyAccessor
interface.
Constructor Summary | |
---|---|
PropertyAccessorUtils()
|
Method Summary | |
---|---|
static java.lang.String |
canonicalPropertyName(java.lang.String propertyName)
Determine the canonical name for the given property path. |
static java.lang.String[] |
canonicalPropertyNames(java.lang.String[] propertyNames)
Determine the canonical names for the given property paths. |
static int |
getFirstNestedPropertySeparatorIndex(java.lang.String propertyPath)
Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]"). |
static int |
getLastNestedPropertySeparatorIndex(java.lang.String propertyPath)
Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]"). |
private static int |
getNestedPropertySeparatorIndex(java.lang.String propertyPath,
boolean last)
Determine the first (or last) nested property separator in the given property path, ignoring dots in keys (like "map[my.key]"). |
static java.lang.String |
getPropertyName(java.lang.String propertyPath)
Return the actual property name for the given property path. |
static boolean |
isNestedOrIndexedProperty(java.lang.String propertyPath)
Check whether the given property path indicates an indexed or nested property. |
static boolean |
matchesProperty(java.lang.String registeredPath,
java.lang.String propertyPath)
Determine whether the given registered path matches the given property path, either indicating the property itself or an indexed element of the property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyAccessorUtils()
Method Detail |
---|
public static java.lang.String getPropertyName(java.lang.String propertyPath)
propertyPath
- the property path to determine the property name
for (can include property keys, for example for specifying a map entry)
public static boolean isNestedOrIndexedProperty(java.lang.String propertyPath)
propertyPath
- the property path to check
public static int getFirstNestedPropertySeparatorIndex(java.lang.String propertyPath)
propertyPath
- the property path to check
public static int getLastNestedPropertySeparatorIndex(java.lang.String propertyPath)
propertyPath
- the property path to check
private static int getNestedPropertySeparatorIndex(java.lang.String propertyPath, boolean last)
propertyPath
- the property path to checklast
- whether to return the last separator rather than the first
public static boolean matchesProperty(java.lang.String registeredPath, java.lang.String propertyPath)
propertyPath
- the property path (typically without index)registeredPath
- the registered path (potentially with index)
public static java.lang.String canonicalPropertyName(java.lang.String propertyName)
map['key']
-> map[key]
map["key"]
-> map[key]
propertyName
- the bean property path
public static java.lang.String[] canonicalPropertyNames(java.lang.String[] propertyNames)
propertyNames
- the bean property paths (as array)
canonicalPropertyName(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |