In at least the latest version of XStream ( 1.2.2 ), there is support for annotating classes to define the aliases. See this page for reference.
This is a request to improve the sub classing ability of org.springframework.oxm.xstream.XStreamMarshaller and add support for handling XStream annotated classes in the oxm packages.
Suggestions for improvement to existing classes
- make the private XStream instance in XStreamMarshaller available to subclasses ( XStream instance needed by Annotations.configureAliases. (perhaps use case for http://opensource.atlassian.com/projects/spring/browse/SWS-34).
- add XStreamAnnotationMarshaller.java(name?) in spring-oxm-tiger dist, that adds support for XStream annotated classes. Perhaps method signatures similar to these
- configureAnnotatedClass(Class<?> topLevelClass)
- configureAnnotatedClasses(Set<Class<?>> topLevelClasses)
The above two methods would call
com.thoughtworks.xstream.annotations.Annotations.configureAliases(XStream xstream, Class<?>... topLevelClasses)
- add method to existing org.springframework.oxm.xstream.XStreamMarshaller that allows one to specify explicit classes that are 'supported' By default public boolean supports(Class clazz) would behave as it does now ( always returning true) unless one were to specify one or more specific classes that are only to be supported.