Search in sources :

Example 1 with Mapper

use of com.thoughtworks.xstream.mapper.Mapper in project hudson-2.x by hudson.

the class XStream2 method wrapMapper.

@Override
protected MapperWrapper wrapMapper(MapperWrapper next) {
    Mapper m = new CompatibilityMapper(new MapperWrapper(next) {

        @Override
        public String serializedClass(Class type) {
            if (type != null && ImmutableMap.class.isAssignableFrom(type))
                return super.serializedClass(ImmutableMap.class);
            else
                return super.serializedClass(type);
        }
    });
    AnnotationMapper a = new AnnotationMapper(m, getConverterRegistry(), getClassLoader(), getReflectionProvider(), getJvm());
    a.autodetectAnnotations(true);
    return a;
}
Also used : Mapper(com.thoughtworks.xstream.mapper.Mapper) AnnotationMapper(com.thoughtworks.xstream.mapper.AnnotationMapper) MapperWrapper(com.thoughtworks.xstream.mapper.MapperWrapper) AnnotationMapper(com.thoughtworks.xstream.mapper.AnnotationMapper)

Aggregations

AnnotationMapper (com.thoughtworks.xstream.mapper.AnnotationMapper)1 Mapper (com.thoughtworks.xstream.mapper.Mapper)1 MapperWrapper (com.thoughtworks.xstream.mapper.MapperWrapper)1