inclV = inclV.withOverrides(propDef.findInclusion());
@Override public JsonInclude.Value findPropertyInclusion(MapperConfig<?> config, Class<?> baseType) { JsonInclude.Value v0 = config.getDefaultInclusion(baseType, _type.getRawClass()); AnnotationIntrospector intr = config.getAnnotationIntrospector(); if ((intr == null) || (_member == null)) { return v0; } JsonInclude.Value v = intr.findPropertyInclusion(_member); if (v == null) { return v0; } return v0.withOverrides(v); }
@Override public JsonInclude.Value findPropertyInclusion(MapperConfig<?> config, Class<?> baseType) { JsonInclude.Value v0 = config.getDefaultPropertyInclusion(baseType); AnnotationIntrospector intr = config.getAnnotationIntrospector(); if ((intr == null) || (_member == null)) { return v0; } JsonInclude.Value v = intr.findPropertyInclusion(_member); if (v == null) { return v0; } return v0.withOverrides(v); }
/** * @since 2.8 */ public static Value mergeAll(Value... values) { Value result = null; for (Value curr : values) { if (curr != null) { result = (result == null) ? curr : result.withOverrides(curr); } } return result; }
@Override public JsonInclude.Value findPropertyInclusion(Annotated a) { JsonInclude.Value v2 = _secondary.findPropertyInclusion(a); JsonInclude.Value v1 = _primary.findPropertyInclusion(a); if (v2 == null) { // shouldn't occur but return v1; } return v2.withOverrides(v1); }
@Override public final JsonInclude.Value getDefaultInclusion(Class<?> baseType, Class<?> propertyType) { JsonInclude.Value v = getConfigOverride(propertyType).getIncludeAsProperty(); JsonInclude.Value def = getDefaultPropertyInclusion(baseType); if (def == null) { return v; } return def.withOverrides(v); }
@Override public JsonInclude.Value findPropertyInclusion(Annotated a) { JsonInclude.Value v2 = _secondary.findPropertyInclusion(a); JsonInclude.Value v1 = _primary.findPropertyInclusion(a); if (v2 == null) { // shouldn't occur but return v1; } return v2.withOverrides(v1); }
@Override public final JsonInclude.Value getDefaultPropertyInclusion(Class<?> baseType) { JsonInclude.Value v = getConfigOverride(baseType).getInclude(); JsonInclude.Value def = getDefaultPropertyInclusion(); if (def == null) { return v; } return def.withOverrides(v); }
/** * Helper method that will try to combine values from two {@link Value} * instances, using one as base settings, and the other as overrides * to use instead of base values when defined; base values are only * use if override does not specify a value (matching value is null * or logically missing). * Note that one or both of value instances may be `null`, directly; * if both are `null`, result will also be `null`; otherwise never null. */ public static Value merge(Value base, Value overrides) { return (base == null) ? overrides : base.withOverrides(overrides); }
public static Value mergeAll(Value... values) { Value result = null; for (Value curr : values) { if (curr != null) { result = (result == null) ? curr : result.withOverrides(curr); } } return result; }
/** * Helper method that will try to combine values from two {@link Value} * instances, using one as base settings, and the other as overrides * to use instead of base values when defined; base values are only * use if override does not specify a value (matching value is null * or logically missing). * Note that one or both of value instances may be `null`, directly; * if both are `null`, result will also be `null`; otherwise never null. * * @since 2.8 */ public static Value merge(Value base, Value overrides) { return (base == null) ? overrides : base.withOverrides(overrides); }
@Override public JsonInclude.Value findPropertyInclusion(MapperConfig<?> config, Class<?> baseType) { AnnotationIntrospector intr = config.getAnnotationIntrospector(); AnnotatedMember member = getMember(); if (member == null) { JsonInclude.Value def = config.getDefaultPropertyInclusion(baseType); return def; } JsonInclude.Value v0 = config.getDefaultInclusion(baseType, member.getRawType()); if (intr == null) { return v0; } JsonInclude.Value v = intr.findPropertyInclusion(member); if (v0 == null) { return v; } return v0.withOverrides(v); }
/** * @since 2.8 */ public static Value mergeAll(Value... values) { Value result = null; for (Value curr : values) { if (curr != null) { result = (result == null) ? curr : result.withOverrides(curr); } } return result; }
/** * Method for determining whether null properties should be written * out for a Bean of introspected type. This is based on global * feature (lowest priority, passed as argument) * and per-class annotation (highest priority). */ @Override public JsonInclude.Value findPropertyInclusion(JsonInclude.Value defValue) { if (_annotationIntrospector != null) { JsonInclude.Value incl = _annotationIntrospector.findPropertyInclusion(_classInfo); if (incl != null) { return (defValue == null) ? incl : defValue.withOverrides(incl); } } return defValue; }
/** * Helper method that will try to combine values from two {@link Value} * instances, using one as base settings, and the other as overrides * to use instead of base values when defined; base values are only * use if override does not specify a value (matching value is null * or logically missing). * Note that one or both of value instances may be `null`, directly; * if both are `null`, result will also be `null`; otherwise never null. * * @since 2.8 */ public static Value merge(Value base, Value overrides) { return (base == null) ? overrides : base.withOverrides(overrides); }
@Override public JsonInclude.Value findPropertyInclusion(MapperConfig<?> config, Class<?> baseType) { JsonInclude.Value v0 = config.getDefaultInclusion(baseType, _type.getRawClass()); AnnotationIntrospector intr = config.getAnnotationIntrospector(); if ((intr == null) || (_member == null)) { return v0; } JsonInclude.Value v = intr.findPropertyInclusion(_member); if (v == null) { return v0; } return v0.withOverrides(v); }
/** * @since 2.8 */ public static Value mergeAll(Value... values) { Value result = null; for (Value curr : values) { if (curr != null) { result = (result == null) ? curr : result.withOverrides(curr); } } return result; }
@Override public JsonInclude.Value findPropertyInclusion(Annotated a) { JsonInclude.Value v2 = _secondary.findPropertyInclusion(a); JsonInclude.Value v1 = _primary.findPropertyInclusion(a); if (v2 == null) { // shouldn't occur but return v1; } return v2.withOverrides(v1); }
@Override public final JsonInclude.Value getDefaultInclusion(Class<?> baseType, Class<?> propertyType) { JsonInclude.Value v = getConfigOverride(propertyType).getIncludeAsProperty(); JsonInclude.Value def = getDefaultPropertyInclusion(baseType); if (def == null) { return v; } return def.withOverrides(v); }
@Override public final JsonInclude.Value getDefaultPropertyInclusion(Class<?> baseType) { JsonInclude.Value v = getConfigOverride(baseType).getInclude(); JsonInclude.Value def = getDefaultPropertyInclusion(); if (def == null) { return v; } return def.withOverrides(v); }