public class ObjectPath
extends java.lang.Object
| Constructor | Description |
|---|---|
ObjectPath(java.lang.Object object) |
| Modifier and Type | Method | Description |
|---|---|---|
static ObjectPath |
createFromResponse(Response response) |
|
static ObjectPath |
createFromXContent(XContent xContent,
BytesReference input) |
|
static <T> T |
evaluate(java.lang.Object object,
java.lang.String path) |
A utility method that creates an
ObjectPath via ObjectPath(Object) returns
the result of calling evaluate(String) on it. |
<T> T |
evaluate(java.lang.String path) |
Returns the object corresponding to the provided path if present, null otherwise
|
<T> T |
evaluate(java.lang.String path,
Stash stash) |
Returns the object corresponding to the provided path if present, null otherwise
|
XContentBuilder |
toXContentBuilder(XContent xContent) |
Create a new
XContentBuilder from the xContent object underlying this ObjectPath. |
public static ObjectPath createFromResponse(Response response) throws java.io.IOException
java.io.IOExceptionpublic static ObjectPath createFromXContent(XContent xContent, BytesReference input) throws java.io.IOException
java.io.IOExceptionpublic static <T> T evaluate(java.lang.Object object,
java.lang.String path)
throws java.io.IOException
ObjectPath via ObjectPath(Object) returns
the result of calling evaluate(String) on it.java.io.IOExceptionpublic <T> T evaluate(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionpublic <T> T evaluate(java.lang.String path,
Stash stash)
throws java.io.IOException
java.io.IOExceptionpublic XContentBuilder toXContentBuilder(XContent xContent) throws java.io.IOException
XContentBuilder from the xContent object underlying this ObjectPath.
This only works for ObjectPath instances created from an xContent object, not from nested
substructures. We throw an UnsupportedOperationException in those cases.java.io.IOException