public final class CustomizedObjectArraySerializer extends java.lang.Object implements Serializer<java.lang.Object[]>
Serializer.EncoderContext
Constructor and Description |
---|
CustomizedObjectArraySerializer(io.micronaut.core.type.Argument<java.lang.Object> componentType,
Serializer<java.lang.Object> componentSerializer) |
Modifier and Type | Method and Description |
---|---|
boolean |
isEmpty(Serializer.EncoderContext context,
java.lang.Object[] value)
Used for
JsonInclude.Include#NON_EMPTY checking. |
void |
serialize(Encoder encoder,
Serializer.EncoderContext context,
io.micronaut.core.type.Argument<? extends java.lang.Object[]> type,
java.lang.Object[] value)
Serializes the given value using the passed
Encoder . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createSpecific, isAbsent
public CustomizedObjectArraySerializer(io.micronaut.core.type.Argument<java.lang.Object> componentType, Serializer<java.lang.Object> componentSerializer)
public void serialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends java.lang.Object[]> type, java.lang.Object[] value) throws java.io.IOException
Serializer
Encoder
.serialize
in interface Serializer<java.lang.Object[]>
encoder
- The encoder to usecontext
- The encoder context, never null
type
- Models the generic type of the valuevalue
- The value, can be null
java.io.IOException
- If an error occurs during serializationpublic boolean isEmpty(Serializer.EncoderContext context, java.lang.Object[] value)
Serializer
JsonInclude.Include#NON_EMPTY
checking.isEmpty
in interface Serializer<java.lang.Object[]>
context
- The encoder contextvalue
- The check to checktrue
if the value is empty