PropertyAccessor interface.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the canonical representation of the property paththe bean property path propertyName)Determine the canonical name for the given property path. |
| public static String[] | Returns: the canonical representation of the property paths (as array of the same size)the bean property paths (as array) propertyNames)Determine the canonical names for the given property paths. |
| public static int | Returns: the index of the nested property separator, or -1 if nonethe property path to check propertyPath)Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]"). |
| public static int | Returns: the index of the nested property separator, or -1 if nonethe property path to check propertyPath)Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]"). |
| private static int | Returns: the index of the nested property separator, or -1 if nonethe property path to check propertyPath, boolean whether to return the last separator rather than the first last)Determine the first (or last) nested property separator in the given property path, ignoring dots in keys (like "map[my.key]"). |
| public static String | Returns: the actual property name, without any key elementsthe property path to determine the property name
for (can include property keys, for example for specifying a map entry) propertyPath)Return the actual property name for the given property path. |
| public static boolean | Returns: whether the path indicates an indexed or nested propertythe property path to check propertyPath)Check whether the given property path indicates an indexed or nested property. |
| public static boolean | Returns: whether the paths matchthe registered path (potentially with index) registeredPath, String the property path (typically without index) propertyPath)Determine whether the given registered path matches the given property path, either indicating the property itself or an indexed element of the property. |
| PropertyAccessorUtils | back to summary |
|---|---|
| public PropertyAccessorUtils() | |
| canonicalPropertyName | back to summary |
|---|---|
| public static String canonicalPropertyName(String propertyName) Determine the canonical name for the given property path.
Removes surrounding quotes from map keys: | |
| canonicalPropertyNames | back to summary |
|---|---|
| public static String[] canonicalPropertyNames(String[] propertyNames) Determine the canonical names for the given property paths.
| |
| getFirstNestedPropertySeparatorIndex | back to summary |
|---|---|
| public static int getFirstNestedPropertySeparatorIndex(String propertyPath) Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]").
| |
| getLastNestedPropertySeparatorIndex | back to summary |
|---|---|
| public static int getLastNestedPropertySeparatorIndex(String propertyPath) Determine the first nested property separator in the given property path, ignoring dots in keys (like "map[my.key]").
| |
| getNestedPropertySeparatorIndex | back to summary |
|---|---|
| private static int getNestedPropertySeparatorIndex(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]").
| |
| getPropertyName | back to summary |
|---|---|
| public static String getPropertyName(String propertyPath) Return the actual property name for the given property path. | |
| isNestedOrIndexedProperty | back to summary |
|---|---|
| public static boolean isNestedOrIndexedProperty(String propertyPath) Check whether the given property path indicates an indexed or nested property.
| |
| matchesProperty | back to summary |
|---|---|
| public static boolean matchesProperty(String registeredPath, 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. | |