Class StdDeserializer<T>

    • Method Detail

      • handledType

        public java.lang.Class<?> handledType()
        Description copied from class: JsonDeserializer
        Method for accessing concrete physical type of values this deserializer produces. Note that this information is not guaranteed to be exact -- it may be a more generic (super-type) -- but it should not be incorrect (return a non-related type).

        Default implementation will return null, which means almost same same as returning Object.class would; that is, that nothing is known about handled type.

        Overrides:
        handledType in class JsonDeserializer<T>
        Returns:
        Physical type of values this deserializer produces, if known; null if not
      • getValueClass

        @Deprecated
        public final java.lang.Class<?> getValueClass()
        Deprecated.
        Since 2.3 use handledType() instead
      • getValueType

        public JavaType getValueType()
        Exact structured type this deserializer handles, if known.
      • getValueType

        public JavaType getValueType​(DeserializationContext ctxt)
        Convenience method for getting handled type as JavaType, regardless of whether deserializer has one already resolved (and accessible via getValueType()) or not: equivalent to:
           if (getValueType() != null) {
                return getValueType();
           }
           return ctxt.constructType(handledType());
        
        Since:
        2.10
      • deserializeWithType

        public java.lang.Object deserializeWithType​(JsonParser p,
                                                    DeserializationContext ctxt,
                                                    TypeDeserializer typeDeserializer)
                                             throws java.io.IOException
        Base implementation that does not assume specific type inclusion mechanism. Sub-classes are expected to override this method if they are to handle type information.
        Overrides:
        deserializeWithType in class JsonDeserializer<T>
        typeDeserializer - Deserializer to use for handling type information
        Throws:
        java.io.IOException