Class AdaptedObjectDeserializer<A,​T>

  • Type Parameters:
    A - adapted type, type to deserialize JSON into
    T - required type, typically type of the field, which is adapted to another type
    All Implemented Interfaces:
    javax.json.bind.serializer.JsonbDeserializer<T>, RuntimeTypeInfo, CurrentItem<T>

    public class AdaptedObjectDeserializer<A,​T>
    extends Object
    implements CurrentItem<T>, javax.json.bind.serializer.JsonbDeserializer<T>
    Decorator for an item which builds adapted type instance by a JsonbAdapter. After adapted item is finished building its instance is converted to field type object by calling components.
    • Constructor Detail

      • AdaptedObjectDeserializer

        public AdaptedObjectDeserializer​(AdapterBinding adapterInfo,
                                         AbstractContainerDeserializer<?> wrapperItem)
        Creates decoration instance wrapping real adapted object item.
        Parameters:
        adapterInfo - components type info
        wrapperItem - wrapper item to get instance from
    • Method Detail

      • setAdaptedTypeDeserializer

        public void setAdaptedTypeDeserializer​(javax.json.bind.serializer.JsonbDeserializer<A> adaptedTypeDeserializer)
        Sets adapted item.
        Parameters:
        adaptedTypeDeserializer - Adapted item to set.
      • deserialize

        public T deserialize​(javax.json.stream.JsonParser parser,
                             javax.json.bind.serializer.DeserializationContext context,
                             Type rtType)
        Specified by:
        deserialize in interface javax.json.bind.serializer.JsonbDeserializer<A>