| Modifier and Type | Field and Description |
|---|---|
| private final MonetaryAmountFormatFactory | |
| private final boolean | |
| private final FieldNames | |
| private final NameTransformer | |
| private final AmountWriter |
| Access | Constructor and Description |
|---|---|
| pack-priv | MonetaryAmountSerializer(final FieldNames names, final AmountWriter<?> writer, final MonetaryAmountFormatFactory factory, boolean isUnwrapping, final NameTransformer nameTransformer)
|
| pack-priv | MonetaryAmountSerializer(final FieldNames names, final AmountWriter<?> writer, final MonetaryAmountFormatFactory factory)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | acceptJsonFormatVisitor(final JsonFormatVisitorWrapper wrapper, final JavaType hint)
Overrides tools. Implements tools. Default implementation specifies no format. |
| private String | |
| public boolean | isUnwrappingSerializer()
Overrides tools. Accessor for checking whether this serializer is an "unwrapping" serializer; this is necessary to know since it may also require caller to suppress writing of the leading property name. |
| public void | serialize(final MonetaryAmount value, final JsonGenerator json, final SerializationContext ctxt)
Implements abstract tools. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| public void | serializeWithType(final MonetaryAmount value, final JsonGenerator generator, final SerializationContext provider, final TypeSerializer serializer)
Overrides tools. Method that can be called to ask implementation to serialize values of type this serializer handles, using specified type serializer for embedding necessary type information. |
| private String | |
| public ValueSerializer | unwrappingSerializer(final NameTransformer nameTransformer)
Overrides tools. Method that will return serializer instance that produces "unwrapped" serialization, if applicable for type being serialized (which is the case for some serializers that produce JSON Objects as output). |
| factory | back to summary |
|---|---|
| private final MonetaryAmountFormatFactory factory | |
| isUnwrapping | back to summary |
|---|---|
| private final boolean isUnwrapping | |
| names | back to summary |
|---|---|
| private final FieldNames names | |
| nameTransformer | back to summary |
|---|---|
| private final NameTransformer nameTransformer | |
| writer | back to summary |
|---|---|
| private final AmountWriter<?> writer | |
| MonetaryAmountSerializer | back to summary |
|---|---|
| pack-priv MonetaryAmountSerializer(final FieldNames names, final AmountWriter<?> writer, final MonetaryAmountFormatFactory factory, boolean isUnwrapping, final NameTransformer nameTransformer) | |
| MonetaryAmountSerializer | back to summary |
|---|---|
| pack-priv MonetaryAmountSerializer(final FieldNames names, final AmountWriter<?> writer, final MonetaryAmountFormatFactory factory) | |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(final JsonFormatVisitorWrapper wrapper, final JavaType hint) Overrides tools. Implements tools. Doc from tools. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| format | back to summary |
|---|---|
| private String format(final MonetaryAmount value, final SerializationContext ctxt) | |
| isUnwrappingSerializer | back to summary |
|---|---|
| public boolean isUnwrappingSerializer() Overrides tools. Doc from tools. Accessor for checking whether this serializer is an "unwrapping" serializer; this is necessary to know since it may also require caller to suppress writing of the leading property name.
| |
| serialize | back to summary |
|---|---|
| public void serialize(final MonetaryAmount value, final JsonGenerator json, final SerializationContext ctxt) Implements abstract tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(final MonetaryAmount value, final JsonGenerator generator, final SerializationContext provider, final TypeSerializer serializer) Overrides tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles, using specified type serializer for embedding necessary type information.
Default implementation will throw For simple datatypes written as a single scalar value (JSON String, Number, Boolean), implementation would look like: // note: method to call depends on whether this type is serialized as JSON scalar, object or Array! typeSer.writeTypePrefixForScalar(value, gen); serialize(value, gen, provider); typeSer.writeTypeSuffixForScalar(value, gen);and implementations for type serialized as JSON Arrays or Objects would differ slightly, as START-ARRAY/END-ARRAY and
START-OBJECT/END-OBJECT pairs
need to be properly handled with respect to serializing of contents.
| |
| transformName | back to summary |
|---|---|
| private String transformName(String name) | |
| unwrappingSerializer | back to summary |
|---|---|
| public ValueSerializer Overrides tools. Doc from tools. Method that will return serializer instance that produces "unwrapped" serialization, if applicable for type being serialized (which is the case for some serializers that produce JSON Objects as output). If no unwrapped serializer can be constructed, will simply return serializer as-is. Default implementation just returns serializer as-is, indicating that no unwrapped variant exists
| |