Class KeyDeserializer<T>

java.lang.Object
org.dominokit.jacksonapt.deser.map.key.KeyDeserializer<T>
Direct Known Subclasses:
BaseDateKeyDeserializer, BaseNumberKeyDeserializer, BooleanKeyDeserializer, CharacterKeyDeserializer, EnumKeyDeserializer, StringKeyDeserializer, UUIDKeyDeserializer

public abstract class KeyDeserializer<T>
extends java.lang.Object
Base class for all the key deserializer. It handles null values and exceptions. The rest is delegated to implementations.
Version:
$Id: $
Author:
Nicolas Morel
  • Constructor Summary

    Constructors
    Constructor Description
    KeyDeserializer()  
  • Method Summary

    Modifier and Type Method Description
    T deserialize​(java.lang.String key, JsonDeserializationContext ctx)
    Deserializes a key into an object.
    protected abstract T doDeserialize​(java.lang.String key, JsonDeserializationContext ctx)
    Deserializes a non-null key into an object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KeyDeserializer

      public KeyDeserializer()
  • Method Details

    • deserialize

      public T deserialize​(java.lang.String key, JsonDeserializationContext ctx) throws JsonDeserializationException
      Deserializes a key into an object.
      Parameters:
      key - key to deserialize
      ctx - Context for the full deserialization process
      Returns:
      the deserialized object
      Throws:
      JsonDeserializationException - if an error occurs during the deserialization
    • doDeserialize

      protected abstract T doDeserialize​(java.lang.String key, JsonDeserializationContext ctx)
      Deserializes a non-null key into an object.
      Parameters:
      key - key to deserialize
      ctx - Context for the full deserialization process
      Returns:
      the deserialized object