| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | GuavaOptionalDeserializer(JavaType fullType, ValueInstantiator inst, TypeDeserializer typeDeser, JsonDeserializer<?> deser)
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | getEmptyValue(DeserializationContext ctxt)
Overrides com. Method called to determine value to be used for "empty" values (most commonly when deserializing from empty JSON Strings). |
| public Optional | getNullValue(DeserializationContext ctxt)
Implements abstract com. Implements com. Method that can be called to determine value to be used for
representing null values (values deserialized when JSON token
is |
| public Object | getReferenced(Optional<?> reference)
Implements abstract com. Method that may be called to find contents of specified reference, if any; or `null` if none. |
| public Optional | referenceValue(Object contents)
Implements abstract com.
|
| public Optional | updateReference(Optional<?> reference, Object contents)
Implements abstract com. Method called in case of "merging update", in which we should try update reference instead of creating a new one. |
| public GuavaOptionalDeserializer | withResolved(TypeDeserializer typeDeser, JsonDeserializer<?> valueDeser)
Implements abstract com. Mutant factory method called when changes are needed; should construct newly configured instance with new values as indicated. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| GuavaOptionalDeserializer | back to summary |
|---|---|
public GuavaOptionalDeserializer(JavaType fullType, ValueInstantiator inst, TypeDeserializer typeDeser, JsonDeserializer<?> deser)
| |
| getEmptyValue | back to summary |
|---|---|
| public Object getEmptyValue(DeserializationContext ctxt) throws JsonMappingException Overrides com. Doc from com. Method called to determine value to be used for "empty" values
(most commonly when deserializing from empty JSON Strings).
Usually this is same as
This method may be called once, or multiple times, depending on what
Default implementation simply calls
| |
| getNullValue | back to summary |
|---|---|
| public Optional Implements abstract com. Implements com. Doc from com. Method that can be called to determine value to be used for
representing null values (values deserialized when JSON token
is
This method may be called once, or multiple times, depending on what
Default implementation simply returns null.
| |
| getReferenced | back to summary |
|---|---|
| public Object getReferenced(Optional<?> reference) Implements abstract com. Doc from com. Method that may be called to find contents of specified reference, if any; or `null` if none. Note that method should never fail, so for types that use concept of "absence" vs "presence", `null` is to be returned for both "absent" and "reference to `null`" cases.
| |
| referenceValue | back to summary |
|---|---|
| public Optional Implements abstract com.
| |
| updateReference | back to summary |
|---|---|
| public Optional Implements abstract com. Doc from com. Method called in case of "merging update", in which we should try update reference instead of creating a new one. If this does not succeed, should just create a new instance.
| |
| withResolved | back to summary |
|---|---|
| public GuavaOptionalDeserializer withResolved(TypeDeserializer typeDeser, JsonDeserializer<?> valueDeser) Implements abstract com. Doc from com. 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.
| |