com.fasterxml.jackson.databind.cfg.MapperConfig.getConfigOverride()方法的使用及代码示例 |
您所在的位置:网站首页 › redisson面试题 › com.fasterxml.jackson.databind.cfg.MapperConfig.getConfigOverride()方法的使用及代码示例 |
本文整理了Java中com.fasterxml.jackson.databind.cfg.MapperConfig.getConfigOverride()方法的一些代码示例,展示了MapperConfig.getConfigOverride()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MapperConfig.getConfigOverride()方法的具体详情如下:包路径:com.fasterxml.jackson.databind.cfg.MapperConfig类名称:MapperConfig方法名:getConfigOverride MapperConfig.getConfigOverride介绍[英]Accessor for finding ConfigOverride to use for properties of given type, if any exist; or if none, return an immutable "empty" instance with no overrides. Note that only directly associated override is found; no type hierarchy traversal is performed.[中]用于查找用于给定类型属性(如果存在)的ConfigOverride的访问器;或者,如果没有,则返回不带重写的不可变“空”实例。请注意,只找到直接关联的覆盖;不执行类型层次结构遍历。 代码示例代码示例来源:origin: redisson/redisson /** * Accessor for default property inclusion to use for serialization, * considering possible per-type override for given base type; but * if none found, returning given defaultIncl * * @param defaultIncl Inclusion setting to return if no overrides found. * * @since 2.8.2 */public JsonInclude.Value getDefaultPropertyInclusion(Class> baseType, JsonInclude.Value defaultIncl){ JsonInclude.Value v = getConfigOverride(baseType).getInclude(); if (v != null) { return v; } return defaultIncl;} 代码示例来源:origin: redisson/redisson /** * Accessor for default property inclusion to use for serialization, * considering possible per-type override for given base type and * possible per-type override for given property type; but * if none found, returning given defaultIncl * * @param baseType Type of the instance containing the targeted property. * @param propertyType Type of the property to look up inclusion setting for. * @param defaultIncl Inclusion setting to return if no overrides found. * * @since 2.9 */public JsonInclude.Value getDefaultInclusion(Class> baseType, Class> propertyType, JsonInclude.Value defaultIncl){ JsonInclude.Value baseOverride = getConfigOverride(baseType).getInclude(); JsonInclude.Value propOverride = getConfigOverride(propertyType).getIncludeAsProperty(); JsonInclude.Value result = JsonInclude.Value.mergeAll(defaultIncl, baseOverride, propOverride); return result;} 代码示例来源:origin: redisson/redisson ConfigOverride co = _config.getConfigOverride(rawType);JsonSetter.Value setterInfo = co.getSetterInfo();if (setterInfo != null) { 代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind /** * Accessor for default property inclusion to use for serialization, * considering possible per-type override for given base type; but * if none found, returning given defaultIncl * * @param defaultIncl Inclusion setting to return if no overrides found. * * @since 2.8.2 */public JsonInclude.Value getDefaultPropertyInclusion(Class> baseType, JsonInclude.Value defaultIncl){ JsonInclude.Value v = getConfigOverride(baseType).getInclude(); if (v != null) { return v; } return defaultIncl;} 代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind /** * Accessor for default property inclusion to use for serialization, * considering possible per-type override for given base type and * possible per-type override for given property type; but * if none found, returning given defaultIncl * * @param baseType Type of the instance containing the targeted property. * @param propertyType Type of the property to look up inclusion setting for. * @param defaultIncl Inclusion setting to return if no overrides found. * * @since 2.9 */public JsonInclude.Value getDefaultInclusion(Class> baseType, Class> propertyType, JsonInclude.Value defaultIncl){ JsonInclude.Value baseOverride = getConfigOverride(baseType).getInclude(); JsonInclude.Value propOverride = getConfigOverride(propertyType).getIncludeAsProperty(); JsonInclude.Value result = JsonInclude.Value.mergeAll(defaultIncl, baseOverride, propOverride); return result;} 代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind ConfigOverride co = _config.getConfigOverride(rawType);JsonSetter.Value setterInfo = co.getSetterInfo();if (setterInfo != null) { |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |