@Override @Deprecated public JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr) { if ((_member != null) && (intr != null)) { JsonFormat.Value v = intr.findFormat(_member); if (v != null) { return v; } } return EMPTY_FORMAT; }
@Override public JsonFormat.Value findFormat(Annotated ann) { JsonFormat.Value v1 = _primary.findFormat(ann); JsonFormat.Value v2 = _secondary.findFormat(ann); if (v2 == null) { // shouldn't occur but just in case return v1; } return v2.withOverrides(v1); }
@Override @Deprecated public final JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr) { JsonFormat.Value f = null; if (intr != null) { AnnotatedMember member = getMember(); if (member != null) { f = intr.findFormat(member); } } if (f == null) { f = EMPTY_FORMAT; } return f; }
@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 JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property) throws JsonMappingException { if (property != null) { JsonFormat.Value format = ctxt.getAnnotationIntrospector().findFormat((Annotated) property.getMember()); if (format != null) { if (format.hasPattern()) { final String pattern = format.getPattern(); final Locale locale = format.hasLocale() ? format.getLocale() : ctxt.getLocale(); DateTimeFormatter df; if (locale == null) { df = DateTimeFormatter.ofPattern(pattern); } else { df = DateTimeFormatter.ofPattern(pattern, locale); } return withDateFormat(df); } // any use for TimeZone? } } return this; } }
@Override public JsonFormat.Value findFormat(AnnotatedMember member) { JsonFormat.Value result = _primary.findFormat(member); if (result == null) { result = _secondary.findFormat(member); } return result; }
@Override public JsonFormat.Value findExpectedFormat(JsonFormat.Value defValue) { if (_annotationIntrospector != null) { JsonFormat.Value v = _annotationIntrospector.findFormat(_classInfo); if (v != null) { return v; } } return defValue; }
@Override public JsonFormat.Value findExpectedFormat(JsonFormat.Value defValue) { if (_annotationIntrospector != null) { JsonFormat.Value v = _annotationIntrospector.findFormat(_classInfo); if (v != null) { return v; } } return defValue; }
@Override public JsonFormat.Value findFormat(Annotated ann) { JsonFormat.Value r = _primary.findFormat(ann); return (r == null) ? _secondary.findFormat(ann) : r; }
@Override public JsonFormat.Value findFormat(Annotated ann) { JsonFormat.Value result = _primary.findFormat(ann); if (result == null) { result = _secondary.findFormat(ann); } return result; }
@Override public JsonFormat.Value findExpectedFormat(JsonFormat.Value defValue) { if (_annotationIntrospector != null) { JsonFormat.Value v = _annotationIntrospector.findFormat(_classInfo); if (v != null) { return v; } } return defValue; }
@Override public JsonFormat.Value findFormat(Annotated ann) { JsonFormat.Value r = _primary.findFormat(ann); return (r == null) ? _secondary.findFormat(ann) : r; }
@Override @Deprecated public JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr) { if ((_member != null) && (intr != null)) { JsonFormat.Value v = intr.findFormat(_member); if (v != null) { return v; } } return EMPTY_FORMAT; }
@Override @Deprecated public JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr) { if ((_member != null) && (intr != null)) { JsonFormat.Value v = intr.findFormat(_member); if (v != null) { return v; } } return EMPTY_FORMAT; }
@Override public JsonFormat.Value findFormat(Annotated ann) { JsonFormat.Value v1 = _primary.findFormat(ann); JsonFormat.Value v2 = _secondary.findFormat(ann); if (v2 == null) { // shouldn't occur but just in case return v1; } return v2.withOverrides(v1); }
@Override public JsonFormat.Value findFormat(Annotated ann) { JsonFormat.Value v1 = _primary.findFormat(ann); JsonFormat.Value v2 = _secondary.findFormat(ann); if (v2 == null) { // shouldn't occur but just in case return v1; } return v2.withOverrides(v1); }
@Override @Deprecated public final JsonFormat.Value findFormatOverrides(AnnotationIntrospector intr) { JsonFormat.Value f = null; if (intr != null) { AnnotatedMember member = getMember(); if (member != null) { f = intr.findFormat(member); } } if (f == null) { f = EMPTY_FORMAT; } return f; }
@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); }