Interface ObjectMapper.Factory

    • Method Detail

      • get

        default <V> ObjectMapper<V> get​(io.leangen.geantyref.TypeToken<V> type)
                                 throws SerializationException
        Get an object mapper for the provided type.

        The provided type cannot be a raw type.

        Type Parameters:
        V - mapped type
        Parameters:
        type - token holding the mapped type
        Returns:
        a mapper for the provided type
        Throws:
        SerializationException - if the type does not correspond to a mappable object
        Since:
        4.0.0
      • get

        default <V> ObjectMapper<V> get​(java.lang.Class<V> clazz)
                                 throws SerializationException
        Get an object mapper for the unparameterized type clazz.

        The provided type cannot be a raw type.

        Type Parameters:
        V - mapped type
        Parameters:
        clazz - class of the mapped type
        Returns:
        a mapper for the provided type
        Throws:
        SerializationException - if the type does not correspond to a mappable object
        Since:
        4.0.0
      • get

        ObjectMapper<?> get​(java.lang.reflect.Type type)
                     throws SerializationException
        Get the object mapper for the provided type.

        The provided type cannot be a raw type.

        Parameters:
        type - object type.
        Returns:
        a mapper for the provided type
        Throws:
        SerializationException - if the type does not correspond to a mappable object
        Since:
        4.0.0