public final class MetadataUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MetadataUtil.MetadataMap |
Modifier and Type | Method and Description |
---|---|
static <T> T |
fromMetadata(Map<String,Object> metadata,
String key,
T objectToMerge)
Fills an object with entries from metadata for a given key.
|
static MetadataUtil.MetadataMap |
map() |
static <T> T |
merge(T objectToMerge,
Object patch)
Patches the object to merge.
|
public static <T> T fromMetadata(Map<String,Object> metadata, String key, T objectToMerge)
T
- - type of the object to mergemetadata
- - metadata from the contractkey
- - key under which metadata can be foundobjectToMerge
- - object to be filled with entries from the metadatapublic static <T> T merge(T objectToMerge, Object patch)
T
- - type of the object to mergeobjectToMerge
- - object to be filled with entries from the metadatapatch
- - object that is a patch for an object to mergepublic static MetadataUtil.MetadataMap map()
Copyright © 2016–2022 Spring. All rights reserved.