ValueSerializer to output java.util.UUID s.
Beyond optimized access and writing of textual representation (which
is the default handling in most cases), it will alternatively
allow serialization using raw binary output (as 16-byte block)
if underlying data format has efficient means to access that.
| Modifier and Type | Field and Description |
|---|---|
| protected final Boolean | _asBinary
Configuration setting that indicates if serialization as binary
(native or Base64-encoded) has been forced; |
| pack-priv static final char[] |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static final void | |
| private static void | |
| private static final byte[] | |
| protected boolean | |
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
Overrides tools. Implements tools. Default implementation specifies no format. |
| public ValueSerializer | createContextual(SerializationContext serializers, BeanProperty property)
Overrides tools. Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property (or, for root values, in which case `null` is passed). |
| public boolean | isEmpty(SerializationContext prov, UUID value)
Overrides tools. Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values). |
| public void | serialize(UUID value, JsonGenerator gen, SerializationContext ctxt)
Implements abstract tools. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| _asBinary | back to summary |
|---|---|
| protected final Boolean _asBinary Configuration setting that indicates if serialization as binary
(native or Base64-encoded) has been forced; | |
| HEX_CHARS | back to summary |
|---|---|
| pack-priv static final char[] HEX_CHARS | |
| UUIDSerializer | back to summary |
|---|---|
| public UUIDSerializer() | |
| UUIDSerializer | back to summary |
|---|---|
| protected UUIDSerializer(Boolean asBinary) | |
| _appendInt | back to summary |
|---|---|
| private static void _appendInt(int bits, char[] ch, int offset) | |
| _appendInt | back to summary |
|---|---|
| private static final void _appendInt(int value, byte[] buffer, int offset) | |
| _appendShort | back to summary |
|---|---|
| private static void _appendShort(int bits, char[] ch, int offset) | |
| _asBytes | back to summary |
|---|---|
| private static final byte[] _asBytes(UUID uuid) | |
| _writeAsBinary | back to summary |
|---|---|
| protected boolean _writeAsBinary(SerializationContext ctxt) | |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) Overrides tools. Implements tools. Doc from tools. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| createContextual | back to summary |
|---|---|
| public ValueSerializer Overrides tools. Doc from tools. Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property (or, for root values, in which case `null` is passed). Note that instance that this method is called on is typically shared one and as a result method should NOT modify this instance but rather construct and return a new instance. This instance should only be returned as-is, in case it is already suitable for use. Note that method is only called once per POJO property, and for the first usage as root value serializer; it is not called for every serialization, as doing that would have significant performance impact; most serializers cache contextual instances for future use.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty(SerializationContext prov, UUID value) Overrides tools. Doc from tools. Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values). Default implementation will consider only null values to be empty.
| |
| serialize | back to summary |
|---|---|
| public void serialize(UUID value, JsonGenerator gen, SerializationContext ctxt) throws JacksonException Implements abstract tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |