Class GuavaTypeModifier

java.lang.Object
com.fasterxml.jackson.databind.type.TypeModifier
com.fasterxml.jackson.datatype.guava.GuavaTypeModifier
All Implemented Interfaces:
Serializable

public class GuavaTypeModifier extends com.fasterxml.jackson.databind.type.TypeModifier implements 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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JavaType
    modifyType(com.fasterxml.jackson.databind.JavaType type, 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
  • Field Details

  • Constructor Details

    • GuavaTypeModifier

      public GuavaTypeModifier()
  • Method Details

    • modifyType

      public com.fasterxml.jackson.databind.JavaType modifyType(com.fasterxml.jackson.databind.JavaType type, 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