Class GuavaOptionalSerializer

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, java.io.Serializable

    public class GuavaOptionalSerializer
    extends com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>>
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

        com.fasterxml.jackson.databind.JsonSerializer.None
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
      • Fields inherited from class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer

        _dynamicSerializers, _property, _referredType, _suppressableValue, _suppressNulls, _unwrapper, _valueSerializer, _valueTypeSerializer, MARKER_FOR_EMPTY
      • Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        _handledType
    • Constructor Summary

      Constructors 
      Constructor Description
      GuavaOptionalSerializer​(com.fasterxml.jackson.databind.type.ReferenceType fullType, boolean staticTyping, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<java.lang.Object> ser)  
      GuavaOptionalSerializer​(GuavaOptionalSerializer base, com.fasterxml.jackson.databind.BeanProperty property, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> valueSer, com.fasterxml.jackson.databind.util.NameTransformer unwrapper, java.lang.Object suppressableValue, boolean suppressNulls)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object _getReferenced​(com.google.common.base.Optional<?> value)  
      protected java.lang.Object _getReferencedIfPresent​(com.google.common.base.Optional<?> value)  
      protected boolean _isValuePresent​(com.google.common.base.Optional<?> value)  
      com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>> withContentInclusion​(java.lang.Object suppressableValue, boolean suppressNulls)  
      protected com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>> withResolved​(com.fasterxml.jackson.databind.BeanProperty prop, com.fasterxml.jackson.databind.jsontype.TypeSerializer vts, com.fasterxml.jackson.databind.JsonSerializer<?> valueSer, com.fasterxml.jackson.databind.util.NameTransformer unwrapper)  
      • Methods inherited from class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer

        _useStatic, acceptJsonFormatVisitor, createContextual, getReferredType, isEmpty, isUnwrappingSerializer, serialize, serializeWithType, unwrappingSerializer
      • Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

        _neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
      • Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

        getDelegatee, isEmpty, properties, replaceDelegatee, usesObjectId, withFilterId, withIgnoredProperties
      • Methods inherited from class java.lang.Object

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

      • GuavaOptionalSerializer

        public GuavaOptionalSerializer​(com.fasterxml.jackson.databind.type.ReferenceType fullType,
                                       boolean staticTyping,
                                       com.fasterxml.jackson.databind.jsontype.TypeSerializer vts,
                                       com.fasterxml.jackson.databind.JsonSerializer<java.lang.Object> ser)
      • GuavaOptionalSerializer

        public GuavaOptionalSerializer​(GuavaOptionalSerializer base,
                                       com.fasterxml.jackson.databind.BeanProperty property,
                                       com.fasterxml.jackson.databind.jsontype.TypeSerializer vts,
                                       com.fasterxml.jackson.databind.JsonSerializer<?> valueSer,
                                       com.fasterxml.jackson.databind.util.NameTransformer unwrapper,
                                       java.lang.Object suppressableValue,
                                       boolean suppressNulls)
    • Method Detail

      • withResolved

        protected com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>> withResolved​(com.fasterxml.jackson.databind.BeanProperty prop,
                                                                                                                                  com.fasterxml.jackson.databind.jsontype.TypeSerializer vts,
                                                                                                                                  com.fasterxml.jackson.databind.JsonSerializer<?> valueSer,
                                                                                                                                  com.fasterxml.jackson.databind.util.NameTransformer unwrapper)
        Specified by:
        withResolved in class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>>
      • withContentInclusion

        public com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>> withContentInclusion​(java.lang.Object suppressableValue,
                                                                                                                                       boolean suppressNulls)
        Specified by:
        withContentInclusion in class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>>
      • _isValuePresent

        protected boolean _isValuePresent​(com.google.common.base.Optional<?> value)
        Specified by:
        _isValuePresent in class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>>
      • _getReferenced

        protected java.lang.Object _getReferenced​(com.google.common.base.Optional<?> value)
        Specified by:
        _getReferenced in class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>>
      • _getReferencedIfPresent

        protected java.lang.Object _getReferencedIfPresent​(com.google.common.base.Optional<?> value)
        Specified by:
        _getReferencedIfPresent in class com.fasterxml.jackson.databind.ser.std.ReferenceTypeSerializer<com.google.common.base.Optional<?>>