DeserializationContext and
SerializerProvider, context objects passed through data-binding
process. Designed so that some of implementations can rely on shared
aspects like access to secondary contextual objects like type factories
or handler instantiators.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | MAX_ERROR_STR_LEN
Let's limit length of error messages, for cases where underlying data may be very large -- no point in spamming logs with megabytes of meaningless data. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | |
| protected String | |
| protected final String | |
| protected String | |
| private JavaType | _resolveAndValidateGeneric(JavaType baseType, String subClass, PolymorphicTypeValidator ptv, int ltIndex)
|
| protected <T> T | |
| protected <T> T | |
| protected <T> T | |
| protected final String | |
| public abstract boolean | canOverrideAccessModifiers()
Convenience method for accessing serialization view in use (if any); equivalent to: getConfig().canOverrideAccessModifiers(); |
| public abstract JavaType | constructSpecializedType(JavaType baseType, Class<?> subclass)
Convenience method for constructing subtypes, retaining generic type parameter (if any). |
| public JavaType | constructType(Type type)
Convenience method for constructing |
| public Converter | converterInstance(Annotated annotated, Object converterDef)
Helper method to use to construct a |
| public abstract Class | getActiveView()
Accessor for locating currently active view, if any; returns null if no view has been set. |
| public abstract AnnotationIntrospector | getAnnotationIntrospector()
Convenience method for accessing serialization view in use (if any); equivalent to: getConfig().getAnnotationIntrospector(); |
| public abstract Object | Returns: Value of the attribute, if any; null otherwiseKey of the attribute to get key)Method for accessing attributes available in this context. |
| public abstract MapperConfig | getConfig()
Accessor to currently active configuration (both per-request configs and per-mapper config). |
| public abstract DatatypeFeatures | |
| public abstract JsonFormat. | |
| public abstract Locale | |
| public abstract TimeZone | |
| public abstract TypeFactory | |
| protected abstract JsonMappingException | invalidTypeIdException(JavaType baseType, String typeId, String extraDesc)
Helper method for constructing exception to indicate that given type id could not be resolved to a valid subtype of specified base type. |
| public abstract boolean | isEnabled(MapperFeature feature)
Convenience method for checking whether specified Mapper feature is enabled or not. |
| public abstract boolean | isEnabled(DatatypeFeature feature)
Method for checking whether specified datatype feature is enabled or not. |
| public ObjectIdGenerator | |
| public ObjectIdResolver | |
| public abstract <T> T | reportBadDefinition(JavaType type, String msg)
Helper method called to indicate a generic problem that stems from type
definition(s), not input data, or input/output state; typically this
means throwing a |
| public <T> T | |
| public abstract <T> T | |
| public JavaType | resolveAndValidateSubType(JavaType baseType, String subClass, PolymorphicTypeValidator ptv)
Lookup method similar to |
| public JavaType | resolveSubType(JavaType baseType, String subClassName)
Lookup method called when code needs to resolve class name from input; usually simple lookup. |
| public abstract DatabindContext | Returns: This context object, to allow chainingKey of the attribute to set key, Object Value to set attribute to value)Method for setting per-call value of given attribute. |
| MAX_ERROR_STR_LEN | back to summary |
|---|---|
| private static final int MAX_ERROR_STR_LEN Let's limit length of error messages, for cases where underlying data may be very large -- no point in spamming logs with megabytes of meaningless data.
| |
| DatabindContext | back to summary |
|---|---|
| public DatabindContext() | |
| _colonConcat | back to summary |
|---|---|
protected String _colonConcat(String msgBase, String extra)
| |
| _desc | back to summary |
|---|---|
protected String _desc(String desc)
| |
| _format | back to summary |
|---|---|
protected final String _format(String msg, Object... msgArgs)
| |
| _quotedString | back to summary |
|---|---|
protected String _quotedString(String desc)
| |
| _resolveAndValidateGeneric | back to summary |
|---|---|
| private JavaType _resolveAndValidateGeneric(JavaType baseType, String subClass, PolymorphicTypeValidator ptv, int ltIndex) throws JsonMappingException | |
| _throwNotASubtype | back to summary |
|---|---|
| protected <T> T _throwNotASubtype(JavaType baseType, String subType) throws JsonMappingException | |
| _throwSubtypeClassNotAllowed | back to summary |
|---|---|
| protected <T> T _throwSubtypeClassNotAllowed(JavaType baseType, String subType, PolymorphicTypeValidator ptv) throws JsonMappingException | |
| _throwSubtypeNameNotAllowed | back to summary |
|---|---|
| protected <T> T _throwSubtypeNameNotAllowed(JavaType baseType, String subType, PolymorphicTypeValidator ptv) throws JsonMappingException | |
| _truncate | back to summary |
|---|---|
protected final String _truncate(String desc)
| |
| canOverrideAccessModifiers | back to summary |
|---|---|
| public abstract boolean canOverrideAccessModifiers() Convenience method for accessing serialization view in use (if any); equivalent to: getConfig().canOverrideAccessModifiers(); | |
| constructSpecializedType | back to summary |
|---|---|
| public abstract JavaType constructSpecializedType(JavaType baseType, Class<?> subclass) Convenience method for constructing subtypes, retaining generic type parameter (if any). Note since 2.11 handling has varied a bit across serialization, deserialization. | |
| constructType | back to summary |
|---|---|
| public JavaType constructType(Type type) Convenience method for constructing | |
| converterInstance | back to summary |
|---|---|
| public Converter Helper method to use to construct a
| |
| getActiveView | back to summary |
|---|---|
| public abstract Class Accessor for locating currently active view, if any; returns null if no view has been set. | |
| getAnnotationIntrospector | back to summary |
|---|---|
| public abstract AnnotationIntrospector getAnnotationIntrospector() Convenience method for accessing serialization view in use (if any); equivalent to: getConfig().getAnnotationIntrospector(); | |
| getAttribute | back to summary |
|---|---|
| public abstract Object getAttribute(Object key) Method for accessing attributes available in this context.
Per-call attributes have highest precedence; attributes set
via | |
| getConfig | back to summary |
|---|---|
| public abstract MapperConfig Accessor to currently active configuration (both per-request configs and per-mapper config). | |
| getDatatypeFeatures | back to summary |
|---|---|
public abstract DatatypeFeatures getDatatypeFeatures()
| |
| getDefaultPropertyFormat | back to summary |
|---|---|
public abstract JsonFormat.
| |
| getLocale | back to summary |
|---|---|
public abstract Locale getLocale()
| |
| getTimeZone | back to summary |
|---|---|
public abstract TimeZone getTimeZone()
| |
| getTypeFactory | back to summary |
|---|---|
| public abstract TypeFactory getTypeFactory() | |
| invalidTypeIdException | back to summary |
|---|---|
| protected abstract JsonMappingException invalidTypeIdException(JavaType baseType, String typeId, String extraDesc) Helper method for constructing exception to indicate that given type id could not be resolved to a valid subtype of specified base type. Most commonly called during polymorphic deserialization.
Note that most of the time this method should NOT be called directly: instead,
method
| |
| isEnabled | back to summary |
|---|---|
| public abstract boolean isEnabled(MapperFeature feature) Convenience method for checking whether specified Mapper feature is enabled or not. Shortcut for: getConfig().isEnabled(feature); | |
| isEnabled | back to summary |
|---|---|
| public abstract boolean isEnabled(DatatypeFeature feature) Method for checking whether specified datatype feature is enabled or not.
| |
| objectIdGeneratorInstance | back to summary |
|---|---|
| public ObjectIdGenerator | |
| objectIdResolverInstance | back to summary |
|---|---|
| public ObjectIdResolver objectIdResolverInstance(Annotated annotated, ObjectIdInfo objectIdInfo) | |
| reportBadDefinition | back to summary |
|---|---|
| public abstract <T> T reportBadDefinition(JavaType type, String msg) throws JsonMappingException Helper method called to indicate a generic problem that stems from type
definition(s), not input data, or input/output state; typically this
means throwing a
| |
| reportBadDefinition | back to summary |
|---|---|
public <T> T reportBadDefinition(Class<?> type, String msg) throws JsonMappingException
| |
| reportBadTypeDefinition | back to summary |
|---|---|
public abstract <T> T reportBadTypeDefinition(BeanDescription bean, String msg, Object... msgArgs) throws JsonMappingException
| |
| resolveAndValidateSubType | back to summary |
|---|---|
| public JavaType resolveAndValidateSubType(JavaType baseType, String subClass, PolymorphicTypeValidator ptv) throws JsonMappingException Lookup method similar to
| |
| resolveSubType | back to summary |
|---|---|
| public JavaType resolveSubType(JavaType baseType, String subClassName) throws JsonMappingException Lookup method called when code needs to resolve class name from input;
usually simple lookup.
Note that unlike
| |
| setAttribute | back to summary |
|---|---|
| public abstract DatabindContext setAttribute(Object key, Object value) Method for setting per-call value of given attribute. This will override any previously defined value for the attribute within this context.
| |