Top Fields Constructors Methods
com.fasterxml.jackson.datatype.guava.ser

public Class RangeSetSerializer

extends JsonSerializer<RangeSet<Comparable<?>>>
implements ContextualSerializer
Class Inheritance
All Implemented Interfaces
com.fasterxml.jackson.databind.ser.ContextualSerializer
Imports
com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.BeanProperty, .JavaType, .JsonSerializer, .SerializerProvider, com.fasterxml.jackson.databind.ser.ContextualSerializer, com.google.common.collect.Range, .RangeSet, java.io.IOException, java.util.List

Field Summary

Modifier and TypeField and Description
private JavaType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JsonSerializer<?>
createContextual(SerializerProvider
Serializer provider to use for accessing config, other serializers
prov
,
BeanProperty
Method or field that represents the property (and is used to access value to serialize). Should be available; but there may be cases where caller cannot provide it and null is passed instead (in which case impls usually pass 'this' serializer as is)
property
)

Implements com.fasterxml.jackson.databind.ser.ContextualSerializer.createContextual.

Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property.

public void
serialize(RangeSet<Comparable<?>>
Value to serialize; can not be null.
value
,
JsonGenerator
Generator used to output resulting Json content
gen
,
SerializerProvider
Provider that can be used to get serializers for serializing Objects value contains, if any.
serializers
)

Implements abstract com.fasterxml.jackson.databind.JsonSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

Inherited from com.fasterxml.jackson.databind.JsonSerializer:
acceptJsonFormatVisitorgetDelegateehandledTypeisEmptyisEmptyisUnwrappingSerializerpropertiesreplaceDelegateeserializeWithTypeunwrappingSerializerusesObjectIdwithFilterIdwithIgnoredProperties

Field Detail

genericRangeListTypeback to summary
private JavaType genericRangeListType

Constructor Detail

RangeSetSerializerback to summary
public RangeSetSerializer()

Method Detail

createContextualback to summary
public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property)

Implements com.fasterxml.jackson.databind.ser.ContextualSerializer.createContextual.

Doc from com.fasterxml.jackson.databind.ser.ContextualSerializer.createContextual.

Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property. Note that instance that this method is called on is typically shared one and as a result method should NOT modify this instance but rather construct and return a new instance. This instance should only be returned as-is, in case it is already suitable for use.

Parameters
prov:SerializerProvider

Serializer provider to use for accessing config, other serializers

property:BeanProperty

Method or field that represents the property (and is used to access value to serialize). Should be available; but there may be cases where caller cannot provide it and null is passed instead (in which case impls usually pass 'this' serializer as is)

Returns:JsonSerializer<?>

Serializer to use for serializing values of specified property; may be this instance or a new instance.

Annotations
@Override
serializeback to summary
public void serialize(RangeSet<Comparable<?>> value, JsonGenerator gen, SerializerProvider serializers) throws IOException

Implements abstract com.fasterxml.jackson.databind.JsonSerializer.serialize.

Doc from com.fasterxml.jackson.databind.JsonSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

Parameters
value:RangeSet<Comparable<?>>

Value to serialize; can not be null.

gen:JsonGenerator

Generator used to output resulting Json content

serializers:SerializerProvider

Provider that can be used to get serializers for serializing Objects value contains, if any.

Annotations
@Override