public class MappedObject
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
MappedObject.ContentReader<C>
Strategy used to read JSON content.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MappedObject(com.fasterxml.jackson.databind.JsonNode node,
java.lang.invoke.MethodHandles.Lookup lookup)
Create a new
MappedObject instance. |
| Modifier and Type | Method and Description |
|---|---|
protected com.fasterxml.jackson.databind.JsonNode |
getNode()
Return the source node of the mapped object.
|
protected static <T extends MappedObject> |
getRoot(java.lang.Object proxy) |
protected static <T extends MappedObject,C> |
of(C content,
MappedObject.ContentReader<C> reader,
java.util.function.Function<com.fasterxml.jackson.databind.JsonNode,T> factory)
Factory method to create a new
MappedObject instance. |
protected static <T extends MappedObject> |
of(java.io.InputStream content,
java.util.function.Function<com.fasterxml.jackson.databind.JsonNode,T> factory)
Factory method to create a new
MappedObject instance. |
protected static <T extends MappedObject> |
of(java.lang.String content,
java.util.function.Function<com.fasterxml.jackson.databind.JsonNode,T> factory)
Factory method to create a new
MappedObject instance. |
protected static <T> T |
valueAt(java.lang.Object proxy,
java.lang.String expression,
java.lang.Class<T> type) |
protected <T> T |
valueAt(java.lang.String expression,
java.lang.Class<T> type)
Get the value at the given JSON path expression as a specific type.
|
protected MappedObject(com.fasterxml.jackson.databind.JsonNode node,
java.lang.invoke.MethodHandles.Lookup lookup)
MappedObject instance.node - the source nodelookup - method handle lookupprotected final com.fasterxml.jackson.databind.JsonNode getNode()
protected <T> T valueAt(java.lang.String expression,
java.lang.Class<T> type)
T - the data typeexpression - the JSON path expressiontype - the desired type. May be a simple JSON type or an interfaceprotected static <T extends MappedObject> T getRoot(java.lang.Object proxy)
protected static <T> T valueAt(java.lang.Object proxy,
java.lang.String expression,
java.lang.Class<T> type)
protected static <T extends MappedObject> T of(java.lang.String content, java.util.function.Function<com.fasterxml.jackson.databind.JsonNode,T> factory) throws java.io.IOException
MappedObject instance.T - the mapped object typecontent - the JSON content for the objectfactory - a factory to create the mapped object from a JsonNodejava.io.IOException - on IO errorprotected static <T extends MappedObject> T of(java.io.InputStream content, java.util.function.Function<com.fasterxml.jackson.databind.JsonNode,T> factory) throws java.io.IOException
MappedObject instance.T - the mapped object typecontent - the JSON content for the objectfactory - a factory to create the mapped object from a JsonNodejava.io.IOException - on IO errorprotected static <T extends MappedObject,C> T of(C content, MappedObject.ContentReader<C> reader, java.util.function.Function<com.fasterxml.jackson.databind.JsonNode,T> factory) throws java.io.IOException
MappedObject instance.T - the mapped object typeC - the content typecontent - the JSON content for the objectreader - the content readerfactory - a factory to create the mapped object from a JsonNodejava.io.IOException - on IO error