public class BeanUtil extends Object
Constructor and Description |
---|
BeanUtil() |
Modifier and Type | Method and 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 of
JsonInclude.Include.NON_DEFAULT . |
protected static boolean |
isCglibGetCallbacks(AnnotatedMethod am)
This method was added to address the need to weed out
CGLib-injected "getCallbacks" method.
|
protected static boolean |
isGroovyMetaClassGetter(AnnotatedMethod am)
Another helper method to deal with Groovy's problematic metadata accessors
|
protected static boolean |
isGroovyMetaClassSetter(AnnotatedMethod am)
Similar to
isCglibGetCallbacks(com.fasterxml.jackson.databind.introspect.AnnotatedMethod) , need to suppress
a cyclic reference. |
protected static String |
legacyManglePropertyName(String basename,
int offset)
Method called to figure out name of the property, given
corresponding suggested name based on a method or field name.
|
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.
|
protected static String |
stdManglePropertyName(String basename,
int offset) |
public static String okNameForGetter(AnnotatedMethod am, boolean stdNaming)
public static String okNameForRegularGetter(AnnotatedMethod am, String name, boolean stdNaming)
public static String okNameForIsGetter(AnnotatedMethod am, String name, boolean stdNaming)
@Deprecated public static String okNameForSetter(AnnotatedMethod am, boolean stdNaming)
public static String okNameForMutator(AnnotatedMethod am, String prefix, boolean stdNaming)
public static Object getDefaultValue(JavaType type)
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
JsonInclude.Include.NON_DEFAULT
is used.
protected static boolean isCglibGetCallbacks(AnnotatedMethod am)
protected static boolean isGroovyMetaClassSetter(AnnotatedMethod am)
isCglibGetCallbacks(com.fasterxml.jackson.databind.introspect.AnnotatedMethod)
, need to suppress
a cyclic reference.protected static boolean isGroovyMetaClassGetter(AnnotatedMethod am)
protected static String legacyManglePropertyName(String basename, int offset)
basename
- Name of accessor/mutator method, not including prefix
("get"/"is"/"set")Copyright © 2019 JBoss by Red Hat. All rights reserved.