Interface EntityObjectMapper.JsonType<T>

Type Parameters:
T - the value type
Enclosing class:
EntityObjectMapper

public static sealed interface EntityObjectMapper.JsonType<T>
The type a value is serialized as and deserialized from, registered once and for all.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JavaType
    get()
     
    void
    set(com.fasterxml.jackson.core.type.TypeReference<T> type)
    Registers a generic type, new TypeReference<List<Track>>() {}, whose type arguments, unlike those of a Class, survive to the deserialization site.
    void
    set(Class<T> type)
     
  • Method Details

    • set

      void set(com.fasterxml.jackson.core.type.TypeReference<T> type)
      Registers a generic type, new TypeReference<List<Track>>() {}, whose type arguments, unlike those of a Class, survive to the deserialization site.
      Parameters:
      type - the type
      Throws:
      IllegalStateException - in case a type has already been registered
    • set

      void set(Class<T> type)
      Parameters:
      type - the type
      Throws:
      IllegalStateException - in case a type has already been registered
    • get

      com.fasterxml.jackson.databind.JavaType get()
      Returns:
      the registered type
      Throws:
      IllegalStateException - in case no type has been registered