[SWS-361] XStream.addImplicitCollection not supported by XStreamMarshaller Created: 22/May/08  Updated: 21/Jul/08  Resolved: 12/Jun/08

Status: Closed
Project: Spring Web Services
Component/s: OXM
Affects Version/s: 1.5, 1.5.1, 1.5.2
Fix Version/s: 1.5.3

Type: Improvement Priority: Major
Reporter: David DUTOUR Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified



Comment by David DUTOUR [ 23/May/08 ]

Code to add to support ImplicitCollection in XStreamMarshaller

------ CODE -----

  • Adds an implicit Collection for the given type.
  • @param name alias to be used for the type
  • @param type the type to be Collection
    public void addImplicitCollection(String name, Class type) { getXStream().addImplicitCollection(type, name); }


  • Set a implicit colletion/type map, consisting of string implicit collection mapped to <code>Class</code>
  • instances (or Strings to be converted to <code>Class</code> instances).
  • @see org.springframework.beans.propertyeditors.ClassEditor
    public void setImplicitCollection(Map implicitCollection) {
    for (Iterator iterator = implicitCollection.entrySet().iterator(); iterator.hasNext()
    Unknown macro: { Map.Entry entry = (Map.Entry) iterator.next(); Class type; if (entry.getValue() instanceof Class) { type = (Class) entry.getValue(); } else { ClassEditor editor = new ClassEditor(); editor.setAsText(String.valueOf(entry.getValue())); type = (Class) editor.getValue(); } addImplicitCollection((String) entry.getKey(), type); }


        • END CODE -----
Comment by Arjen Poutsma [ 21/Jul/08 ]

Closing issues in 1.5.3

Generated at Mon Oct 22 14:51:48 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.