Class BeanUtil
- java.lang.Object
-
- com.fasterxml.jackson.databind.util.BeanUtil
-
public class BeanUtil extends Object
Helper class that contains functionality needed by both serialization and deserialization side.
-
-
Constructor Summary
Constructors Constructor Description BeanUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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 ofJsonInclude.Include.NON_DEFAULT
.static String
okNameForGetter(AnnotatedMethod am, boolean stdNaming)
static String
okNameForIsGetter(AnnotatedMethod am, String name, boolean stdNaming)
static String
okNameForMutator(AnnotatedMethod am, String prefix, boolean stdNaming)
static String
okNameForRegularGetter(AnnotatedMethod am, String name, boolean stdNaming)
static String
okNameForSetter(AnnotatedMethod am, boolean stdNaming)
Deprecated.static String
stdManglePropertyName(String basename, int offset)
Note: public only since 2.11
-
-
-
Method Detail
-
okNameForGetter
public static String okNameForGetter(AnnotatedMethod am, boolean stdNaming)
- Since:
- 2.5
-
okNameForRegularGetter
public static String okNameForRegularGetter(AnnotatedMethod am, String name, boolean stdNaming)
- Since:
- 2.5
-
okNameForIsGetter
public static String okNameForIsGetter(AnnotatedMethod am, String name, boolean stdNaming)
- Since:
- 2.5
-
okNameForSetter
@Deprecated public static String okNameForSetter(AnnotatedMethod am, boolean stdNaming)
Deprecated.- Since:
- 2.5
-
okNameForMutator
public static String okNameForMutator(AnnotatedMethod am, String prefix, boolean stdNaming)
- Since:
- 2.5
-
getDefaultValue
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 ofJsonInclude.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
JsonInclude.Include.NON_DEFAULT
is used.- Since:
- 2.7
-
-