@Test public void shouldAutomaticallyReadXStreamAnnotationsForIncludedAttributes() { WithAlias alias = new WithAlias(); alias.abc = "Duh!"; WithAliasedAttribute attribute = new WithAliasedAttribute(); attribute.aliased = alias; serialization.from(attribute).include("aliased").serialize(); assertThat(result(), is("<withAliasedAttribute>\n <aliased>\n <def>Duh!</def>\n </aliased>\n</withAliasedAttribute>")); }
public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); }
XStreamXMLSerialization implements XMLSerialization { public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); } }
XStreamXMLSerialization implements XMLSerialization { public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); } XStreamXMLSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); }
XStreamXMLSerialization implements XMLSerialization { public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); } XStreamXMLSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); boolean accepts(String format); Serializer from(T object); Serializer from(T object, String alias); }
XStreamXMLSerialization implements XMLSerialization { public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); } XStreamXMLSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); boolean accepts(String format); Serializer from(T object); Serializer from(T object, String alias);  }