Class AnyGetterWriter
- java.lang.Object
-
- com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
-
- com.fasterxml.jackson.databind.ser.PropertyWriter
-
- com.fasterxml.jackson.databind.ser.BeanPropertyWriter
-
- com.fasterxml.jackson.databind.ser.AnyGetterWriter
-
- All Implemented Interfaces:
BeanProperty,Named,java.io.Serializable
public class AnyGetterWriter extends BeanPropertyWriter implements java.io.Serializable
Class similar toBeanPropertyWriter, but that will be used for serializingJsonAnyGetterannotated (Map) properties- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.BeanProperty
BeanProperty.Bogus, BeanProperty.Std
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotatedMember_accessorMethod (or Field) that represents the "any getter"protected MapSerializer_mapSerializerprotected BeanProperty_propertyprotected JsonSerializer<java.lang.Object>_serializerprivate static longserialVersionUID-
Fields inherited from class com.fasterxml.jackson.databind.ser.BeanPropertyWriter
_accessorMethod, _cfgSerializationType, _contextAnnotations, _declaredType, _dynamicSerializers, _field, _includeInViews, _internalSettings, _member, _name, _nonTrivialBaseType, _nullSerializer, _suppressableValue, _suppressNulls, _typeSerializer, _wrapperName, MARKER_FOR_EMPTY
-
Fields inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
_aliases, _metadata
-
Fields inherited from interface com.fasterxml.jackson.databind.BeanProperty
EMPTY_FORMAT, EMPTY_INCLUDE
-
-
Constructor Summary
Constructors Constructor Description AnyGetterWriter(BeanProperty property, AnnotatedMember accessor, JsonSerializer<?> serializer)Deprecated.Since 2.19, use one that takesBeanPropertyWriterinstead.AnyGetterWriter(BeanPropertyWriter parent, BeanProperty property, AnnotatedMember accessor, JsonSerializer<?> serializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddepositSchemaProperty(JsonObjectFormatVisitor v, SerializerProvider provider)Traversal method used for things like JSON Schema generation, or POJO introspection.voidfixAccess(SerializationConfig config)Method called to ensure that the mutator has proper access rights to be called, as per configuration.voidgetAndFilter(java.lang.Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, PropertyFilter filter)voidgetAndSerialize(java.lang.Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider)voidresolve(SerializerProvider provider)voidserializeAsField(java.lang.Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider prov)Method called to access property that this bean stands for, from within given bean, and to serialize it as a JSON Object field using appropriate serializer.-
Methods inherited from class com.fasterxml.jackson.databind.ser.BeanPropertyWriter
_depositSchemaProperty, _findAndAddDynamic, _handleSelfReference, _new, assignNullSerializer, assignSerializer, assignTypeSerializer, depositSchemaProperty, get, getAnnotation, getContextAnnotation, getFullName, getGenericPropertyType, getInternalSetting, getMember, getName, getPropertyType, getRawSerializationType, getSerializationType, getSerializedName, getSerializer, getType, getTypeSerializer, getViews, getWrapperName, hasNullSerializer, hasSerializer, isUnwrapping, readResolve, removeInternalSetting, rename, serializeAsElement, serializeAsOmittedField, serializeAsPlaceholder, setInternalSetting, setNonTrivialBaseType, toString, unwrappingWriter, willSuppressNulls, wouldConflictWithName
-
Methods inherited from class com.fasterxml.jackson.databind.ser.PropertyWriter
findAnnotation
-
Methods inherited from class com.fasterxml.jackson.databind.introspect.ConcreteBeanPropertyBase
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
_property
protected final BeanProperty _property
-
_accessor
protected final AnnotatedMember _accessor
Method (or Field) that represents the "any getter"
-
_serializer
protected JsonSerializer<java.lang.Object> _serializer
-
_mapSerializer
protected MapSerializer _mapSerializer
-
-
Constructor Detail
-
AnyGetterWriter
public AnyGetterWriter(BeanPropertyWriter parent, BeanProperty property, AnnotatedMember accessor, JsonSerializer<?> serializer)
- Since:
- 2.19
-
AnyGetterWriter
@Deprecated public AnyGetterWriter(BeanProperty property, AnnotatedMember accessor, JsonSerializer<?> serializer)
Deprecated.Since 2.19, use one that takesBeanPropertyWriterinstead.
-
-
Method Detail
-
fixAccess
public void fixAccess(SerializationConfig config)
Description copied from class:BeanPropertyWriterMethod called to ensure that the mutator has proper access rights to be called, as per configuration. Overridden by implementations that have mutators that require access, fields and setters.- Overrides:
fixAccessin classBeanPropertyWriter- Since:
- 2.8.3
-
getAndSerialize
public void getAndSerialize(java.lang.Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider) throws java.lang.Exception- Throws:
java.lang.Exception
-
serializeAsField
public void serializeAsField(java.lang.Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider prov) throws java.lang.ExceptionDescription copied from class:BeanPropertyWriterMethod called to access property that this bean stands for, from within given bean, and to serialize it as a JSON Object field using appropriate serializer.- Overrides:
serializeAsFieldin classBeanPropertyWriter- Throws:
java.lang.Exception
-
depositSchemaProperty
public void depositSchemaProperty(JsonObjectFormatVisitor v, SerializerProvider provider) throws JsonMappingException
Description copied from class:PropertyWriterTraversal method used for things like JSON Schema generation, or POJO introspection.- Specified by:
depositSchemaPropertyin interfaceBeanProperty- Overrides:
depositSchemaPropertyin classBeanPropertyWriter- Parameters:
v- Visitor to used as the callback handler- Throws:
JsonMappingException
-
getAndFilter
public void getAndFilter(java.lang.Object bean, com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, PropertyFilter filter) throws java.lang.Exception- Throws:
java.lang.Exception- Since:
- 2.3
-
resolve
public void resolve(SerializerProvider provider) throws JsonMappingException
- Throws:
JsonMappingException
-
-