Top Description Constructors Methods
tools.jackson.databind.util

public Class BeanUtil

extends Object
Class Inheritance
Imports
java.util.Calendar, .Date, .GregorianCalendar, com.fasterxml.jackson.annotation.JsonInclude, tools.jackson.databind.JavaType, tools.jackson.databind.cfg.MapperConfig

Helper class that contains functionality needed by both serialization and deserialization side.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static String
checkUnsupportedType(MapperConfig<?> config, JavaType type)

Helper method called by tools.jackson.databind.deser.BeanDeserializerFactory and tools.jackson.databind.ser.BeanSerializerFactory to check if given unrecognized type (to be (de)serialized as general POJO) is one of "well-known" types for which there would be a datatype module; and if so, return appropriate failure message to give to caller.

public static Object
getDefaultValue(JavaType type)

Accessor used to find out "default value" to use for comparing values to serialize, to determine whether to exclude value from serialization with inclusion type of com.fasterxml.jackson.annotation.JsonInclude.Include#NON_DEFAULT.

public static boolean
isJodaTimeClass(Class<?> rawType)

private static boolean
public static String
stdManglePropertyName(final String basename, final int offset)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BeanUtilback to summary
public BeanUtil()

Method Detail

checkUnsupportedTypeback to summary
public static String checkUnsupportedType(MapperConfig<?> config, JavaType type)

Helper method called by tools.jackson.databind.deser.BeanDeserializerFactory and tools.jackson.databind.ser.BeanSerializerFactory to check if given unrecognized type (to be (de)serialized as general POJO) is one of "well-known" types for which there would be a datatype module; and if so, return appropriate failure message to give to caller.

getDefaultValueback to summary
public static Object getDefaultValue(JavaType type)

Accessor used to find out "default value" to use for comparing values to serialize, to determine whether to exclude value from serialization with inclusion type of com.fasterxml.jackson.annotation.JsonInclude.Include#NON_DEFAULT.

Default logic is such that for primitives and wrapper types for primitives, expected defaults (0 for `int` and `java.lang.Integer`) are returned; for Strings, empty String, and for structured (Maps, Collections, arrays) and reference types, criteria com.fasterxml.jackson.annotation.JsonInclude.Include#NON_DEFAULT is used.

isJodaTimeClassback to summary
public static boolean isJodaTimeClass(Class<?> rawType)
isJodaTimeClassback to summary
private static boolean isJodaTimeClass(String className)
stdManglePropertyNameback to summary
public static String stdManglePropertyName(final String basename, final int offset)
Annotations
@Deprecated