Class ObjectCodec<T>
- java.lang.Object
-
- org.nuxeo.ecm.automation.io.services.codec.ObjectCodec<T>
-
- Direct Known Subclasses:
AbstractMarshallingRegistryCodec
,ObjectCodecService.BooleanCodec
,ObjectCodecService.CalendarCodec
,ObjectCodecService.DateCodec
,ObjectCodecService.DocumentAdapterCodec
,ObjectCodecService.NumberCodec
,ObjectCodecService.StringCodec
public abstract class ObjectCodec<T> extends Object
- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description ObjectCodec()
ObjectCodec(Class<T> type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Class<?>
findParametrizedType(Class<?> clazz)
Class<T>
getJavaType()
String
getType()
Get this codec type.boolean
isBuiltin()
Whether this codec is a builtin codecT
read(com.fasterxml.jackson.core.JsonParser jp, CoreSession session)
When the object codec is called the stream is positioned on the first value.void
write(com.fasterxml.jackson.core.JsonGenerator jg, T value)
-
-
-
Method Detail
-
getType
public String getType()
Get this codec type. Implementors can override to return a short name. The default name is the object type name.
-
isBuiltin
public boolean isBuiltin()
Whether this codec is a builtin codec
-
write
public void write(com.fasterxml.jackson.core.JsonGenerator jg, T value) throws IOException
- Throws:
IOException
-
read
public T read(com.fasterxml.jackson.core.JsonParser jp, CoreSession session) throws IOException
When the object codec is called the stream is positioned on the first value. For inlined objects this is the first value after the "entity-type" property. For non inlined objects this will be the object itself (i.e. '{' or '[')- Throws:
IOException
-
-