Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.jackson.datatype.guava;
 
 
 
 
public class MultimapTypeModifier extends TypeModifier
    @Override
    public JavaType modifyType(JavaType typeType jdkTypeTypeBindings contextTypeFactory typeFactory) {
        if (Multimap.class.isAssignableFrom(type.getRawClass()))
        {
            JavaType keyType = type.containedType(0);
            JavaType contentType = type.containedType(1);
            if (keyType == null)
            {
                keyType = typeFactory.constructType(String.class);
            }
            if (contentType == null)
            {
                contentType = typeFactory.constructType(Object.class);
            }
            return typeFactory.constructMapLikeType(type.getRawClass(), keyTypecontentType);
        }
        return type;
    }
New to GrepCode? Check out our FAQ X