Class GuavaTypeModifier

  • All Implemented Interfaces:
    java.io.Serializable

    public class GuavaTypeModifier
    extends com.fasterxml.jackson.databind.type.TypeModifier
    implements java.io.Serializable
    We need somewhat hacky support for following Guava types:
    • FluentIterable: addition of seeming "empty" property should not prevent serialization as basic `Iterable` (with standard Jackson (de)serializer)
    • Multimap: can reuse much/most of standard Map support as long as we make sure it is recognized as "Map-like" type (similar to how Scala Maps are supported)
    • Optional: generic type, simpler, more-efficient to detect parameterization here (although not strictly mandatory)
    • Range: same as with Optional, might as well resolve generic type information early on
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static long serialVersionUID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.JavaType modifyType​(com.fasterxml.jackson.databind.JavaType type, java.lang.reflect.Type jdkType, com.fasterxml.jackson.databind.type.TypeBindings bindings, com.fasterxml.jackson.databind.type.TypeFactory typeFactory)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GuavaTypeModifier

        public GuavaTypeModifier()
    • Method Detail

      • modifyType

        public com.fasterxml.jackson.databind.JavaType modifyType​(com.fasterxml.jackson.databind.JavaType type,
                                                                  java.lang.reflect.Type jdkType,
                                                                  com.fasterxml.jackson.databind.type.TypeBindings bindings,
                                                                  com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
        Specified by:
        modifyType in class com.fasterxml.jackson.databind.type.TypeModifier