| Modifier and Type | Field and Description |
|---|---|
| private final transient ValueSerializer | elemSerializer
element specific serializer, if any |
| private final JavaType | elemType
Stream elements type (matching T) |
| Access | Constructor and Description |
|---|---|
| public | Jdk8StreamSerializer(JavaType
Stream type streamType, JavaType Stream elements type (matching T) elemType)Constructor |
| public | Jdk8StreamSerializer(JavaType
Stream type streamType, JavaType Stream elements type (matching T) elemType, ValueSerializer<Object> Custom serializer to use for element type elemSerializer)Constructor with custom serializer |
| Modifier and Type | Method and Description |
|---|---|
| public ValueSerializer | createContextual(SerializationContext provider, BeanProperty property)
Overrides tools. Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property (or, for root values, in which case `null` is passed). |
| public void | serialize(Stream<?> stream, JsonGenerator g, SerializationContext ctxt)
Implements abstract tools. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| elemSerializer | back to summary |
|---|---|
| private final transient ValueSerializer<Object> elemSerializer element specific serializer, if any | |
| elemType | back to summary |
|---|---|
| private final JavaType elemType Stream elements type (matching T) | |
| Jdk8StreamSerializer | back to summary |
|---|---|
| public Jdk8StreamSerializer(JavaType streamType, JavaType elemType) Constructor | |
| Jdk8StreamSerializer | back to summary |
|---|---|
| public Jdk8StreamSerializer(JavaType streamType, JavaType elemType, ValueSerializer<Object> elemSerializer) Constructor with custom serializer
| |
| createContextual | back to summary |
|---|---|
| public ValueSerializer Overrides tools. Doc from tools. Method called to see if a different (or differently configured) serializer is needed to serialize values of specified property (or, for root values, in which case `null` is passed). 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. Note that method is only called once per POJO property, and for the first usage as root value serializer; it is not called for every serialization, as doing that would have significant performance impact; most serializers cache contextual instances for future use.
| |
| serialize | back to summary |
|---|---|
| public void serialize(Stream<?> stream, JsonGenerator g, SerializationContext ctxt) throws JacksonException Implements abstract tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |