Search in sources :

Example 1 with BeanPropertyWriter

use of org.codehaus.jackson.map.ser.BeanPropertyWriter in project zm-mailbox by Zimbra.

the class ZimbraBeanSerializerModifier method changeProperties.

/*
    /**********************************************************
    /* Overridden methods
    /**********************************************************
     */
/**
     * First thing to do is to find annotations regarding XML serialization,
     * and wrap collection serializers.
     */
@Override
public List<BeanPropertyWriter> changeProperties(SerializationConfig config, BasicBeanDescription beanDesc, List<BeanPropertyWriter> beanProperties) {
    AnnotationIntrospector intr = config.getAnnotationIntrospector();
    for (int i = 0, len = beanProperties.size(); i < len; ++i) {
        BeanPropertyWriter bpw = beanProperties.get(i);
        final AnnotatedMember member = bpw.getMember();
        NameInfo nameInfo = new NameInfo(intr, member, bpw.getName());
        if (!nameInfo.needSpecialHandling()) {
            continue;
        }
        beanProperties.set(i, new ZimbraBeanPropertyWriter(bpw, nameInfo));
    }
    return beanProperties;
}
Also used : AnnotationIntrospector(org.codehaus.jackson.map.AnnotationIntrospector) AnnotatedMember(org.codehaus.jackson.map.introspect.AnnotatedMember) BeanPropertyWriter(org.codehaus.jackson.map.ser.BeanPropertyWriter)

Aggregations

AnnotationIntrospector (org.codehaus.jackson.map.AnnotationIntrospector)1 AnnotatedMember (org.codehaus.jackson.map.introspect.AnnotatedMember)1 BeanPropertyWriter (org.codehaus.jackson.map.ser.BeanPropertyWriter)1