类 MappedObject
java.lang.Object
org.springframework.boot.buildpack.platform.json.MappedObject
- 直接已知子类:
BlobReference
,ContainerStatus
,Image
,ImageArchiveIndex
,ImageArchiveManifest
,ImageArchiveManifest.ManifestEntry
,ImageConfig
,Manifest
,ManifestList
Base class for mapped JSON objects.
- 从以下版本开始:
- 2.3.0
- 作者:
- Phillip Webb
-
嵌套类概要
嵌套类修饰符和类型类说明protected static interface
Strategy used to read JSON content. -
构造器概要
构造器限定符构造器说明protected
MappedObject
(com.fasterxml.jackson.databind.JsonNode node, MethodHandles.Lookup lookup) Create a newMappedObject
instance. -
方法概要
修饰符和类型方法说明protected <T> List
<T> childrenAt
(String expression, Function<com.fasterxml.jackson.databind.JsonNode, T> factory) Get children at the given JSON path expression by constructing them using the given factory.protected final com.fasterxml.jackson.databind.JsonNode
getNode()
Return the source node of the mapped object.protected static <T extends MappedObject>
Tprotected static <T extends MappedObject,
C>
Tof
(C content, MappedObject.ContentReader<C> reader, Function<com.fasterxml.jackson.databind.JsonNode, T> factory) Factory method to create a newMappedObject
instance.protected static <T extends MappedObject>
Tof
(InputStream content, Function<com.fasterxml.jackson.databind.JsonNode, T> factory) Factory method to create a newMappedObject
instance.protected static <T extends MappedObject>
TFactory method to create a newMappedObject
instance.protected static <T> T
protected <T> T
Get the value at the given JSON path expression as a specific type.
-
构造器详细资料
-
MappedObject
Create a newMappedObject
instance.- 参数:
node
- the source nodelookup
- method handle lookup
-
-
方法详细资料
-
getNode
protected final com.fasterxml.jackson.databind.JsonNode getNode()Return the source node of the mapped object.- 返回:
- the source node
-
valueAt
Get the value at the given JSON path expression as a specific type.- 类型参数:
T
- the data type- 参数:
expression
- the JSON path expressiontype
- the desired type. May be a simple JSON type or an interface- 返回:
- the value
-
childrenAt
protected <T> List<T> childrenAt(String expression, Function<com.fasterxml.jackson.databind.JsonNode, T> factory) Get children at the given JSON path expression by constructing them using the given factory.- 类型参数:
T
- the child type- 参数:
expression
- the JSON path expressionfactory
- factory used to create the child- 返回:
- a list of children
- 从以下版本开始:
- 3.2.6
-
getRoot
-
valueAt
-
of
protected static <T extends MappedObject> T of(String content, Function<com.fasterxml.jackson.databind.JsonNode, T> factory) throws IOExceptionFactory method to create a newMappedObject
instance.- 类型参数:
T
- the mapped object type- 参数:
content
- the JSON content for the objectfactory
- a factory to create the mapped object from aJsonNode
- 返回:
- the mapped object
- 抛出:
IOException
- on IO error
-
of
protected static <T extends MappedObject> T of(InputStream content, Function<com.fasterxml.jackson.databind.JsonNode, T> factory) throws IOExceptionFactory method to create a newMappedObject
instance.- 类型参数:
T
- the mapped object type- 参数:
content
- the JSON content for the objectfactory
- a factory to create the mapped object from aJsonNode
- 返回:
- the mapped object
- 抛出:
IOException
- on IO error
-
of
protected static <T extends MappedObject,C> T of(C content, MappedObject.ContentReader<C> reader, Function<com.fasterxml.jackson.databind.JsonNode, T> factory) throws IOExceptionFactory method to create a newMappedObject
instance.- 类型参数:
T
- the mapped object typeC
- the content type- 参数:
content
- the JSON content for the objectreader
- the content readerfactory
- a factory to create the mapped object from aJsonNode
- 返回:
- the mapped object
- 抛出:
IOException
- on IO error
-