@Test public void shouldAllowCustomXStreamRetrieval() { RestfulSerialization serialization = new RestfulSerialization(null, null, null, null, null, XStreamBuilderImpl.cleanInstance()) { @Override protected XStream getXStream() { XStream xStream = super.getXStream(); xStream.registerConverter(new MegaConverter()); return xStream; } }; XStream xstream = serialization.getXStream(); Converter converter = xstream.getConverterLookup().lookupConverterForType(CustomType.class); assertThat(converter.getClass(), is(typeCompatibleWith(MegaConverter.class))); converter = xstream.getConverterLookup().lookupConverterForType(CustomNonHMType.class); assertThat(converter.getClass(), is(typeCompatibleWith(MegaConverter.class))); }
@Override protected XStream getXStream() { XStream xStream = super.getXStream(); MethodValueSupportConverter converter = new MethodValueSupportConverter(new ReflectionConverter(xStream.getMapper(), xStream.getReflectionProvider())); xStream.registerConverter(new LinkConverter(converter, restfulie, config)); return xStream; }
RestfulSerialization extends XStreamXMLSerialization { @Override protected XStream getXStream() { XStream xStream = super.getXStream(); MethodValueSupportConverter converter = new MethodValueSupportConverter(new ReflectionConverter(xStream.getMapper(), xStream.getReflectionProvider())); xStream.registerConverter(new LinkConverter(converter, restfulie, config)); return xStream; } }
RestfulSerialization extends XStreamXMLSerialization { @Override protected XStream getXStream() { XStream xStream = super.getXStream(); MethodValueSupportConverter converter = new MethodValueSupportConverter(new ReflectionConverter(xStream.getMapper(), xStream.getReflectionProvider())); xStream.registerConverter(new LinkConverter(converter, restfulie, config)); return xStream; } RestfulSerialization(HttpServletResponse response, TypeNameExtractor extractor, Restfulie restfulie, Configuration config, ProxyInitializer initializer, XStreamBuilder builder); }
RestfulSerialization extends XStreamXMLSerialization { @Override protected XStream getXStream() { XStream xStream = super.getXStream(); MethodValueSupportConverter converter = new MethodValueSupportConverter(new ReflectionConverter(xStream.getMapper(), xStream.getReflectionProvider())); xStream.registerConverter(new LinkConverter(converter, restfulie, config)); return xStream; } RestfulSerialization(HttpServletResponse response, TypeNameExtractor extractor, Restfulie restfulie, Configuration config, ProxyInitializer initializer, XStreamBuilder builder);  }
RestfulSerialization extends XStreamXMLSerialization { @Override protected XStream getXStream() { XStream xStream = super.getXStream(); MethodValueSupportConverter converter = new MethodValueSupportConverter(new ReflectionConverter(xStream.getMapper(), xStream.getReflectionProvider())); xStream.registerConverter(new LinkConverter(converter, restfulie, config)); return xStream; } RestfulSerialization(HttpServletResponse response, TypeNameExtractor extractor, Restfulie restfulie, Configuration config, ProxyInitializer initializer, XStreamBuilder builder);   }