Top Fields Constructors Methods
tools.jackson.datatype.guava.ser

public Class GuavaOptionalSerializer

extends ReferenceTypeSerializer<Optional<?>>
Class Inheritance
Imports
tools.jackson.databind.*, tools.jackson.databind.jsontype.TypeSerializer, tools.jackson.databind.ser.std.ReferenceTypeSerializer, tools.jackson.databind.type.ReferenceType, tools.jackson.databind.util.NameTransformer, com.google.common.base.Optional

Field Summary

Inherited from tools.jackson.databind.ser.std.ReferenceTypeSerializer:
_referredType_suppressableValue_suppressNulls_unwrapperMARKER_FOR_EMPTY

Constructor Summary

AccessConstructor and Description
public
GuavaOptionalSerializer(ReferenceType fullType, boolean staticTyping, TypeSerializer vts, ValueSerializer<Object> ser)

public
GuavaOptionalSerializer(GuavaOptionalSerializer base, BeanProperty property, TypeSerializer vts, ValueSerializer<?> valueSer, NameTransformer unwrapper, Object suppressableValue, boolean suppressNulls)

Method Summary

Modifier and TypeMethod and Description
protected Object
protected Object
protected boolean
_isValuePresent(Optional<?> value)

Implements abstract tools.jackson.databind.ser.std.ReferenceTypeSerializer._isValuePresent.

Method called to see if there is a value present or not.

public ReferenceTypeSerializer<Optional<?>>
withContentInclusion(Object suppressableValue, boolean suppressNulls)

Implements abstract tools.jackson.databind.ser.std.ReferenceTypeSerializer.withContentInclusion.

Mutant factory method called to create a differently constructed instance, specifically with different exclusion rules for contained value.

protected ReferenceTypeSerializer<Optional<?>>
withResolved(BeanProperty prop, TypeSerializer vts, ValueSerializer<?> valueSer, NameTransformer unwrapper)

Implements abstract tools.jackson.databind.ser.std.ReferenceTypeSerializer.withResolved.

Mutant factory method called when changes are needed; should construct newly configured instance with new values as indicated.

Inherited from tools.jackson.databind.ser.std.ReferenceTypeSerializer:
_useStaticacceptJsonFormatVisitorcreateContextualgetReferredTypeisEmptyisUnwrappingSerializerserializeserializeWithTypeunwrappingSerializer

Constructor Detail

GuavaOptionalSerializerback to summary
public GuavaOptionalSerializer(ReferenceType fullType, boolean staticTyping, TypeSerializer vts, ValueSerializer<Object> ser)
GuavaOptionalSerializerback to summary
public GuavaOptionalSerializer(GuavaOptionalSerializer base, BeanProperty property, TypeSerializer vts, ValueSerializer<?> valueSer, NameTransformer unwrapper, Object suppressableValue, boolean suppressNulls)

Method Detail

_getReferencedback to summary
protected Object _getReferenced(Optional<?> value)

Implements abstract tools.jackson.databind.ser.std.ReferenceTypeSerializer._getReferenced.

Annotations
@Override
_getReferencedIfPresentback to summary
protected Object _getReferencedIfPresent(Optional<?> value)

Implements abstract tools.jackson.databind.ser.std.ReferenceTypeSerializer._getReferencedIfPresent.

Annotations
@Override
_isValuePresentback to summary
protected boolean _isValuePresent(Optional<?> value)

Implements abstract tools.jackson.databind.ser.std.ReferenceTypeSerializer._isValuePresent.

Doc from tools.jackson.databind.ser.std.ReferenceTypeSerializer._isValuePresent.

Method called to see if there is a value present or not. Note that value itself may still be `null`, even if present, if referential type allows three states (absent, present-null, present-non-null); some only allow two (absent, present-non-null).

Annotations
@Override
withContentInclusionback to summary
public ReferenceTypeSerializer<Optional<?>> withContentInclusion(Object suppressableValue, boolean suppressNulls)

Implements abstract tools.jackson.databind.ser.std.ReferenceTypeSerializer.withContentInclusion.

Doc from tools.jackson.databind.ser.std.ReferenceTypeSerializer.withContentInclusion.

Mutant factory method called to create a differently constructed instance, specifically with different exclusion rules for contained value.

Note

caller has verified that there are changes, so implementations need NOT check if a new instance is needed.

Annotations
@Override
withResolvedback to summary
protected ReferenceTypeSerializer<Optional<?>> withResolved(BeanProperty prop, TypeSerializer vts, ValueSerializer<?> valueSer, NameTransformer unwrapper)

Implements abstract tools.jackson.databind.ser.std.ReferenceTypeSerializer.withResolved.

Doc from tools.jackson.databind.ser.std.ReferenceTypeSerializer.withResolved.

Mutant factory method called when changes are needed; should construct newly configured instance with new values as indicated.

Note

caller has verified that there are changes, so implementations need NOT check if a new instance is needed.

Annotations
@Override