public abstract class AnnotatedCodec<T extends org.onosproject.net.Annotated>
extends org.onosproject.codec.JsonCodec<T>
| Constructor and Description |
|---|
AnnotatedCodec() |
| Modifier and Type | Method and Description |
|---|---|
protected com.fasterxml.jackson.databind.node.ObjectNode |
annotate(com.fasterxml.jackson.databind.node.ObjectNode node,
T entity,
org.onosproject.codec.CodecContext context)
Adds JSON encoding of the given item annotations to the specified node.
|
protected org.onosproject.net.Annotations |
extractAnnotations(com.fasterxml.jackson.databind.node.ObjectNode objNode,
org.onosproject.codec.CodecContext context)
Extracts annotations of given Object.
|
protected com.fasterxml.jackson.databind.node.ObjectNode annotate(com.fasterxml.jackson.databind.node.ObjectNode node,
T entity,
org.onosproject.codec.CodecContext context)
node - node to add annotations toentity - annotated entitycontext - encode contextprotected org.onosproject.net.Annotations extractAnnotations(com.fasterxml.jackson.databind.node.ObjectNode objNode,
org.onosproject.codec.CodecContext context)
objNode - annotated JSON object nodecontext - decode context