public final class TestUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
getPropertyValue(java.lang.Object root,
java.lang.String propertyPath)
Uses nested
DirectFieldAccessors to obtain a property using dotted notation to traverse fields; e.g. |
static <T> T |
getPropertyValue(java.lang.Object root,
java.lang.String propertyPath,
java.lang.Class<T> type) |
public static java.lang.Object getPropertyValue(java.lang.Object root,
java.lang.String propertyPath)
DirectFieldAccessors to obtain a property using dotted notation to traverse fields; e.g.
"foo.bar.baz" will obtain a reference to the baz field of the bar field of foo. Adopted from Spring Integration.root - The object.propertyPath - The path.public static <T> T getPropertyValue(java.lang.Object root,
java.lang.String propertyPath,
java.lang.Class<T> type)