pbw.setViews(intr.findSerializationViews(accessor)); return pbw;
pbw.setViews(intr.findSerializationViews(accessor)); return pbw;
pbw.setViews(intr.findSerializationViews(accessor)); return pbw;
pbw.setViews(intr.findSerializationViews(accessor)); return pbw;
/** * Secondary helper method for constructing {@link BeanPropertyWriter} for * given member (field or method). */ protected BeanPropertyWriter _constructWriter(SerializationConfig config, TypeBindings typeContext, PropertyBuilder pb, boolean staticTyping, String name, AnnotatedMember accessor) throws JsonMappingException { if (config.isEnabled(SerializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS)) { accessor.fixAccess(); } JavaType type = accessor.getType(typeContext); BeanProperty.Std property = new BeanProperty.Std(name, type, pb.getClassAnnotations(), accessor); // Does member specify a serializer? If so, let's use it. JsonSerializer<Object> annotatedSerializer = findSerializerFromAnnotation(config, accessor, property); // And how about polymorphic typing? First special to cover JAXB per-field settings: TypeSerializer contentTypeSer = null; if (ClassUtil.isCollectionMapOrArray(type.getRawClass())) { contentTypeSer = findPropertyContentTypeSerializer(type, config, accessor, property); } // and if not JAXB collection/array with annotations, maybe regular type info? TypeSerializer typeSer = findPropertyTypeSerializer(type, config, accessor, property); BeanPropertyWriter pbw = pb.buildWriter(name, type, annotatedSerializer, typeSer, contentTypeSer, accessor, staticTyping); // how about views? (1.4+) AnnotationIntrospector intr = config.getAnnotationIntrospector(); pbw.setViews(intr.findSerializationViews(accessor)); return pbw; }