@Override public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType) { JsonFormat.Value v0 = config.getDefaultPropertyFormat(baseType); AnnotationIntrospector intr = config.getAnnotationIntrospector(); if ((intr == null) || (_member == null)) { return v0; } JsonFormat.Value v = intr.findFormat(_member); if (v == null) { return v0; } return v0.withOverrides(v); }
@Override public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType) { // 15-Apr-2016, tatu: Let's calculate lazily, retain; assumption being however that // baseType is always the same JsonFormat.Value v = _propertyFormat; if (v == null) { JsonFormat.Value v1 = config.getDefaultPropertyFormat(baseType); JsonFormat.Value v2 = null; AnnotationIntrospector intr = config.getAnnotationIntrospector(); if (intr != null) { AnnotatedMember member = getMember(); if (member != null) { v2 = intr.findFormat(member); } } if (v1 == null) { v = (v2 == null) ? EMPTY_FORMAT : v2; } else { v = (v2 == null) ? v1 : v1.withOverrides(v2); } _propertyFormat = v; } return v; }
@Override public JsonFormat.Value findExpectedFormat(JsonFormat.Value defValue) { // 15-Apr-2016, tatu: Let's check both per-type defaults and annotations; per-type // defaults having higher precedence, so start with that if (_annotationIntrospector != null) { JsonFormat.Value v = _annotationIntrospector.findFormat(_classInfo); if (v != null) { if (defValue == null) { defValue = v; } else { defValue = defValue.withOverrides(v); } } } JsonFormat.Value v = _config.getDefaultPropertyFormat(_classInfo.getRawType()); if (v != null) { if (defValue == null) { defValue = v; } else { defValue = defValue.withOverrides(v); } } return defValue; }
@Override public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType) { JsonFormat.Value v0 = config.getDefaultPropertyFormat(baseType); AnnotationIntrospector intr = config.getAnnotationIntrospector(); if ((intr == null) || (_member == null)) { return v0; } JsonFormat.Value v = intr.findFormat(_member); if (v == null) { return v0; } return v0.withOverrides(v); }
@Override public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType) { JsonFormat.Value v0 = config.getDefaultPropertyFormat(baseType); AnnotationIntrospector intr = config.getAnnotationIntrospector(); if ((intr == null) || (_member == null)) { return v0; } JsonFormat.Value v = intr.findFormat(_member); if (v == null) { return v0; } return v0.withOverrides(v); }
@Override public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType) { // 15-Apr-2016, tatu: Let's calculate lazily, retain; assumption being however that // baseType is always the same JsonFormat.Value v = _propertyFormat; if (v == null) { JsonFormat.Value v1 = config.getDefaultPropertyFormat(baseType); JsonFormat.Value v2 = null; AnnotationIntrospector intr = config.getAnnotationIntrospector(); if (intr != null) { AnnotatedMember member = getMember(); if (member != null) { v2 = intr.findFormat(member); } } if (v1 == null) { v = (v2 == null) ? EMPTY_FORMAT : v2; } else { v = (v2 == null) ? v1 : v1.withOverrides(v2); } _propertyFormat = v; } return v; }
@Override public JsonFormat.Value findExpectedFormat(JsonFormat.Value defValue) { // 15-Apr-2016, tatu: Let's check both per-type defaults and annotations; per-type // defaults having higher precedence, so start with that if (_annotationIntrospector != null) { JsonFormat.Value v = _annotationIntrospector.findFormat(_classInfo); if (v != null) { if (defValue == null) { defValue = v; } else { defValue = defValue.withOverrides(v); } } } JsonFormat.Value v = _config.getDefaultPropertyFormat(_classInfo.getRawType()); if (v != null) { if (defValue == null) { defValue = v; } else { defValue = defValue.withOverrides(v); } } return defValue; }
@Override public JsonFormat.Value findPropertyFormat(MapperConfig<?> config, Class<?> baseType) { // 15-Apr-2016, tatu: Let's calculate lazily, retain; assumption being however that // baseType is always the same JsonFormat.Value v = _propertyFormat; if (v == null) { JsonFormat.Value v1 = config.getDefaultPropertyFormat(baseType); JsonFormat.Value v2 = null; AnnotationIntrospector intr = config.getAnnotationIntrospector(); if (intr != null) { AnnotatedMember member = getMember(); if (member != null) { v2 = intr.findFormat(member); } } if (v1 == null) { v = (v2 == null) ? EMPTY_FORMAT : v2; } else { v = (v2 == null) ? v1 : v1.withOverrides(v2); } _propertyFormat = v; } return v; }
@Override public JsonFormat.Value findExpectedFormat(JsonFormat.Value defValue) { // 15-Apr-2016, tatu: Let's check both per-type defaults and annotations; per-type // defaults having higher precedence, so start with that if (_annotationIntrospector != null) { JsonFormat.Value v = _annotationIntrospector.findFormat(_classInfo); if (v != null) { if (defValue == null) { defValue = v; } else { defValue = defValue.withOverrides(v); } } } JsonFormat.Value v = _config.getDefaultPropertyFormat(_classInfo.getRawType()); if (v != null) { if (defValue == null) { defValue = v; } else { defValue = defValue.withOverrides(v); } } return defValue; }