DATACMNS-1198 - Added PropertyPath.getLeafType() to expose leaf-property type.

This commit is contained in:
Oliver Gierke
2017-10-19 12:25:00 +02:00
parent d2008ea3b7
commit b3e1601bc6
2 changed files with 14 additions and 0 deletions

View File

@@ -132,6 +132,15 @@ public class PropertyPath implements Streamable<PropertyPath> {
return result;
}
/**
* Returns the type of the leaf property of the current {@link PropertyPath}.
*
* @return will never be {@literal null}.
*/
public Class<?> getLeafType() {
return getLeafProperty().getType();
}
/**
* Returns the type of the property will return the plain resolved type for simple properties, the component type for
* any {@link Iterable} or the value type of a {@link java.util.Map} if the property is one.