Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.fasterxml.jackson.datatype.guava.deser;
  
  
  
 
 public abstract class GuavaCollectionDeserializer<T>
     extends StdDeserializer<T>
     implements ContextualDeserializer
 {
     protected final CollectionType _containerType;
    
    
Deserializer used for values contained in collection being deserialized; either assigned on constructor, or during resolve().
 
     protected final JsonDeserializer<?> _valueDeserializer;

    
If value instances have polymorphic type information, this is the type deserializer that can deserialize required type information
 
     protected final TypeDeserializer _typeDeserializerForValue;
     
     protected GuavaCollectionDeserializer(CollectionType type,
             TypeDeserializer typeDeserJsonDeserializer<?> deser)
     {
         super(type);
          = type;
          = typeDeser;
          = deser;
     }

    
Overridable fluent factory method used for creating contextual instances.
 
     public abstract GuavaCollectionDeserializer<T> withResolved(
             TypeDeserializer typeDeserJsonDeserializer<?> valueDeser);
     
     /*
     /**********************************************************
     /* Validation, post-processing
     /**********************************************************
      */

    
Method called to finalize setup of this deserializer, after deserializer itself has been registered. This is needed to handle recursive and transitive dependencies.
 
             BeanProperty propertythrows JsonMappingException
     {
         JsonDeserializer<?> deser = ;
         TypeDeserializer typeDeser = ;
         if (deser == null) {
             deser = ctxt.findContextualValueDeserializer(.getContentType(), property);
         }
         if (typeDeser != null) {
             typeDeser = typeDeser.forProperty(property);
         }
         if (deser ==  && typeDeser == ) {
             return this;
         }
         return withResolved(typeDeserdeser);
     }
 
     /*
     /**********************************************************
     /* Deserialization interface
     /**********************************************************
      */
    
    
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.
 
     @Override
             TypeDeserializer typeDeserializer)
         throws IOExceptionJsonProcessingException
     {
         return typeDeserializer.deserializeTypedFromArray(jpctxt);
     }
     
     @Override
     public T deserialize(JsonParser jpDeserializationContext ctxt)
             throws IOExceptionJsonProcessingException
     {
         // Ok: must point to START_ARRAY
        if (jp.getCurrentToken() != .) {
            throw ctxt.mappingException(.getRawClass());
        }
        return _deserializeContents(jpctxt);
    }
    /*
    /**********************************************************************
    /* Abstract methods for impl classes
    /**********************************************************************
     */
    protected abstract T _deserializeContents(JsonParser jpDeserializationContext ctxt)
            throws IOExceptionJsonProcessingException;
New to GrepCode? Check out our FAQ X