西河:去除类属性 [英] Xstream: removing class attribute
本文介绍了西河:去除类属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何删除的类=东西的在西河属性。
How do I remove the class="Something " attributes in Xstream .
我用西河与注释
推荐答案
事实上,问题并不像措辞清楚,因为它应该。我的猜测是,您使用的是非标准的集合或使用它的XStream需要存储实际的类的接口类型的字段。
Indeed the problem is not as clearly phrased as it should. My guess is that you are using a non-standard collection or using a field of an interface type for which XStream needs to store the actual class.
在第二种情况下你可以使用别名:
In the second case you can just use alias:
xstream.alias(字段名,Interface.class,ActualClassToUse.class);
请参阅 http://markmail.org/message/gds63p3dnhpy3ef2 了解更多详情。
这篇关于西河:去除类属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文