【发布时间】:2014-02-13 22:31:45
【问题描述】:
field : param
class : xmleditor.domain.Type
required-type : xmleditor.domain.Type
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /root/type/param[2]
我得到这个错误,我得到了重复的参数。但是当我尝试使用时
xstream.addImplicitCollection
我得到这个错误:
Exception in thread "main" com.thoughtworks.xstream.InitializationException: Field "param" declares no collection or array.
所以我真的不知道我的问题是什么。
@XStreamAlias("root")
public class Type {
private Info info;
@XStreamAlias("OBJECT_TYPE")
private String objectType;
private Properties prop;
private Parameters param;
private Restrictions restri;
@XStreamImplicit(itemFieldName = "type")
private List typeList = new ArrayList();
// Constructor, Getters and setters.
这个问题的原因可能是什么?
【问题讨论】: