protected Converter<Object,Object> findConverter(DeserializationContext ctxt, Annotated a) throws JsonMappingException { Object convDef = ctxt.getAnnotationIntrospector().findDeserializationConverter(a); if (convDef == null) { return null; } return ctxt.converterInstance(a, convDef); } /**
/** * @since 2.9 */ protected boolean _hasCreatorAnnotation(DeserializationContext ctxt, Annotated ann) { AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { JsonCreator.Mode mode = intr.findCreatorAnnotation(ctxt.getConfig(), ann); return (mode != null) && (mode != JsonCreator.Mode.DISABLED); } return false; }
/** * Method called to see if given method has annotations that indicate * a more specific type than what the argument specifies. * * @deprecated Since 2.8; call {@link #resolveMemberAndTypeAnnotations} instead */ @Deprecated protected JavaType modifyTypeByAnnotation(DeserializationContext ctxt, Annotated a, JavaType type) throws JsonMappingException { AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr == null) { return type; } return intr.refineDeserializationType(ctxt.getConfig(), a, type); }
private EnumResolver _getToStringResolver(DeserializationContext ctxt) { EnumResolver res = _byToStringResolver; if (res == null) { synchronized (this) { res = EnumResolver.constructUnsafeUsingToString(_byNameResolver.getEnumClass(), ctxt.getAnnotationIntrospector()); _byToStringResolver = res; } } return res; } }
/** * @since 2.9 */ protected JsonDeserializer<Object> findContentDeserializerFromAnnotation(DeserializationContext ctxt, Annotated ann) throws JsonMappingException { AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { Object deserDef = intr.findContentDeserializer(ann); if (deserDef != null) { return ctxt.deserializerInstance(ann, deserDef); } } return null; }
/** * Helper method called to check if a class or method * has annotation that tells which class to use for deserialization. * Returns null if no such annotation found. */ protected KeyDeserializer findKeyDeserializerFromAnnotation(DeserializationContext ctxt, Annotated ann) throws JsonMappingException { AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { Object deserDef = intr.findKeyDeserializer(ann); if (deserDef != null) { return ctxt.keyDeserializerInstance(ann, deserDef); } } return null; }
/** * Helper method called to check if a class or method * has annotation that tells which class to use for deserialization; and if * so, to instantiate, that deserializer to use. * Note that deserializer will NOT yet be contextualized so caller needs to * take care to call contextualization appropriately. * Returns null if no such annotation found. */ protected JsonDeserializer<Object> findDeserializerFromAnnotation(DeserializationContext ctxt, Annotated ann) throws JsonMappingException { AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { Object deserDef = intr.findDeserializer(ann); if (deserDef != null) { return ctxt.deserializerInstance(ann, deserDef); } } return null; }
/** * Helper method called to check if a class or method * has annotation that tells which class to use for deserialization. * Returns null if no such annotation found. */ protected JsonDeserializer<Object> findDeserializerFromAnnotation(DeserializationContext ctxt, Annotated ann) throws JsonMappingException { Object deserDef = ctxt.getAnnotationIntrospector().findDeserializer(ann); if (deserDef == null) { return null; } JsonDeserializer<Object> deser = ctxt.deserializerInstance(ann, deserDef); // One more thing however: may need to also apply a converter: return findConvertingDeserializer(ctxt, ann, deser); }
protected CompactStringObjectMap _getToStringLookup(DeserializationContext ctxt) { CompactStringObjectMap lookup = _lookupByToString; // note: exact locking not needed; all we care for here is to try to // reduce contention for the initial resolution if (lookup == null) { synchronized (this) { lookup = EnumResolver.constructUnsafeUsingToString(_enumClass(), ctxt.getAnnotationIntrospector()) .constructLookup(); } _lookupByToString = lookup; } return lookup; } }
/** * Helper method called to see if given property might be so-called unwrapped * property: these require special handling. */ protected NameTransformer _findPropertyUnwrapper(DeserializationContext ctxt, SettableBeanProperty prop) throws JsonMappingException { AnnotatedMember am = prop.getMember(); if (am != null) { NameTransformer unwrapper = ctxt.getAnnotationIntrospector().findUnwrappingNameTransformer(am); if (unwrapper != null) { // 01-Dec-2016, tatu: As per [databind#265] we cannot yet support passing // of unwrapped values through creator properties, so fail fast if (prop instanceof CreatorProperty) { ctxt.reportBadDefinition(getValueType(), String.format( "Cannot define Creator property \"%s\" as `@JsonUnwrapped`: combination not yet supported", prop.getName())); } return unwrapper; } } return null; }
AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (_neitherNull(intr, property)) { AnnotatedMember member = property.getMember();
Object instDef = ctxt.getAnnotationIntrospector().findValueInstantiator(ac); if (instDef != null) { instantiator = _valueInstantiatorInstance(config, ac, instDef);
/** * Helper method that can be used to see if specified property is annotated * to indicate use of a converter for property value (in case of container types, * it is container type itself, not key or content type). *<p> * NOTE: returned deserializer is NOT yet contextualized, caller needs to take * care to do that. * * @since 2.2 */ protected JsonDeserializer<Object> findConvertingDeserializer(DeserializationContext ctxt, SettableBeanProperty prop) throws JsonMappingException { final AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr != null) { Object convDef = intr.findDeserializationConverter(prop.getMember()); if (convDef != null) { Converter<Object,Object> conv = ctxt.converterInstance(prop.getMember(), convDef); JavaType delegateType = conv.getInputType(ctxt.getTypeFactory()); // 25-Mar-2017, tatu: should not yet contextualize // JsonDeserializer<?> deser = ctxt.findContextualValueDeserializer(delegateType, prop); JsonDeserializer<?> deser = ctxt.findNonContextualValueDeserializer(delegateType); return new StdDelegatingDeserializer<Object>(conv, delegateType, deser); } } return null; }
throws JsonMappingException final AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (_neitherNull(intr, prop)) { AnnotatedMember member = prop.getMember();
BeanProperty property) throws JsonMappingException final AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (property != null && intr != null) { final AnnotatedMember accessor = property.getMember();
NameTransformer unwrapper = ctxt.getAnnotationIntrospector().findUnwrappingNameTransformer(param); if (unwrapper != null) { _reportUnwrappedCreatorProperty(ctxt, beanDesc, param);
AnnotationIntrospector intr = ctxt.getAnnotationIntrospector();
throws JsonMappingException AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr == null) { return type;
throws JsonMappingException AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); if (intr == null) { return type;
final AnnotationIntrospector intr = ctxt.getAnnotationIntrospector(); PropertyMetadata metadata;