[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


 Description   

http://xstream.codehaus.org/javadoc/com/thoughtworks/xstream/XStream.html#addImplicitCollection(java.lang.Class,%20java.lang.String)



 Comments   
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 Sun Dec 17 06:11:49 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.