类 MappedObject
java.lang.Object
cn.taketoday.buildpack.platform.json.MappedObject
- 直接已知子类:
BuilderMetadata,BuildpackLayersMetadata,BuildpackLayersMetadata.BuildpackLayerDetails,BuildpackMetadata,ContainerStatus,DockerConfigurationMetadata.DockerConfig,DockerConfigurationMetadata.DockerContext,Image,ImageArchiveManifest,ImageArchiveManifest.ManifestEntry,ImageConfig
Base class for mapped JSON objects.
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb
-
嵌套类概要
嵌套类修饰符和类型类说明protected static interfaceStrategy used to read JSON content.private static class -
字段概要
字段 -
构造器概要
构造器限定符构造器说明protectedMappedObject(JsonNode node, MethodHandles.Lookup lookup) Create a newMappedObjectinstance. -
方法概要
修饰符和类型方法说明protected final JsonNodegetNode()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<JsonNode, T> factory) Factory method to create a newMappedObjectinstance.protected static <T extends MappedObject>
Tof(InputStream content, Function<JsonNode, T> factory) Factory method to create a newMappedObjectinstance.protected static <T extends MappedObject>
TFactory method to create a newMappedObjectinstance.private static <T> TvalueAt(MappedObject root, JsonNode node, MethodHandles.Lookup lookup, String expression, Class<T> type) protected static <T> Tprotected <T> TGet the value at the given JSON path expression as a specific type.
-
字段详细资料
-
node
-
lookup
-
-
构造器详细资料
-
MappedObject
Create a newMappedObjectinstance.- 参数:
node- the source nodelookup- method handle lookup
-
-
方法详细资料
-
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
-
getRoot
-
valueAt
-
valueAt
private static <T> T valueAt(MappedObject root, JsonNode node, MethodHandles.Lookup lookup, String expression, Class<T> type) -
of
protected static <T extends MappedObject> T of(String content, Function<JsonNode, T> factory) throws IOExceptionFactory method to create a newMappedObjectinstance.- 类型参数:
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<JsonNode, T> factory) throws IOExceptionFactory method to create a newMappedObjectinstance.- 类型参数:
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<JsonNode, T> factory) throws IOExceptionFactory method to create a newMappedObjectinstance.- 类型参数:
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
-