/** * @deprecated Since 2.7 Use {@link #getType()} instead. To be removed from 2.9 */ @Deprecated public final JavaType getType(TypeBindings bogus) { return getType(); }
reportBadDefinition(annotated.getType(), "AnnotationIntrospector returned serializer definition of type " +serDef.getClass().getName()+"; expected type JsonSerializer or Class<JsonSerializer> instead"); reportBadDefinition(annotated.getType(), "AnnotationIntrospector returned Class " +serClass.getName()+"; expected Class<JsonSerializer>");
@Override public ObjectIdInfo findObjectIdInfo(Annotated annotated) { Class<?> rawClass = annotated.getType().getRawClass(); for (Type<?> type : model.getTypes()) { if (type.getClassType() == rawClass && type.getSingleKeyAttribute() != null) {
/** * @deprecated Since 2.7 Use {@link #getType()} instead. To be removed from 2.9 */ @Deprecated public final JavaType getType(TypeBindings bogus) { return getType(); }
/** * @deprecated Since 2.7 Use {@link #getType()} instead. To be removed from 2.9 */ @Deprecated public final JavaType getType(TypeBindings bogus) { return getType(); }
private Type getType(Annotated a) { try { // Jackson 2.7+ return a.getType(); } catch (Throwable t) { return a.getGenericType(); } } }
@Override public Object findSerializer(Annotated am) { MaskableSensitiveData annotation = am.getAnnotation(MaskableSensitiveData.class); if (annotation != null) { return MaskableSerializerFactory.createSerializer(am.getType(), annotation); } return null; } }
@Override public Object findSerializationConverter(Annotated a) { JtToMap ann = a.getAnnotation(JtToMap.class); if (ann == null) { return null; } return new SerializationConverterImpl(ann, new Ctx(a, a.getType())); }
@Override public Object findSerializationConverter(Annotated a) { Class<? extends PropertyInterceptor>[] interceptors = getInterceptors(a); if (interceptors == null) { return null; } return new KvInterceptorsSerializationConverter(interceptors, new KvPropertyContextImpl(a, a.getType())); }
private JavaType extractType(Annotated annotated) { if (annotated instanceof AnnotatedMethod) { AnnotatedMethod method = (AnnotatedMethod) annotated; if (ClassUtils.isSetter(method.getAnnotated())) { return method.getParameterType(0); } return method.getType(); } return annotated.getType(); }
private Stream<InputField> toInputField(PropertyDescriptor desc, BeanPropertyDefinition prop, ObjectMapper objectMapper, GlobalEnvironment environment) { if (!environment.inclusionStrategy.includeInputField(desc.declaringClass, desc.element, desc.type)) { return Stream.empty(); } AnnotatedType deserializableType = resolveDeserializableType(desc.accessor, desc.type, desc.accessor.getType(), objectMapper); Object defaultValue = defaultValue(desc.declaringType, prop, desc.type, environment.typeTransformer, environment); return Stream.of(new InputField(prop.getName(), prop.getMetadata().getDescription(), desc.type, deserializableType, defaultValue, desc.element)); }
reportBadDefinition(annotated.getType(), "AnnotationIntrospector returned serializer definition of type " +serDef.getClass().getName()+"; expected type JsonSerializer or Class<JsonSerializer> instead"); reportBadDefinition(annotated.getType(), "AnnotationIntrospector returned Class " +serClass.getName()+"; expected Class<JsonSerializer>");
@Override public Object findDeserializationConverter(Annotated a) { Class<? extends PropertyInterceptor>[] interceptors = getInterceptors(a); if (interceptors == null) { return null; } JavaType javaType = a.getType(); if(a instanceof AnnotatedMethod) { AnnotatedMethod am = (AnnotatedMethod) a; if(am.getParameterCount() == 1) { javaType = am.getParameterType(0); } else { throw new RuntimeException("Invalid property setter: " + am.getAnnotated()); } } return new KvInterceptorsDeserializationConverter(interceptors, new KvPropertyContextImpl(a, javaType)); }
@Override public Object findDeserializationConverter(Annotated a) { JtToMap ann = a.getAnnotation(JtToMap.class); if (ann == null) { return null; } JavaType javaType = a.getType(); if(a instanceof AnnotatedMethod) { AnnotatedMethod am = (AnnotatedMethod) a; if(am.getParameterCount() == 1) { javaType = am.getParameterType(0); } else { throw new RuntimeException("Invalid property setter: " + am.getAnnotated()); } } return new DeserializationConverterImpl(ann, new Ctx(a, javaType)); } }