如果多个转换器可以解组 xml,会发生什么? [英] What happens if multiple converters can unmarshal xml?
本文介绍了如果多个转换器可以解组 xml,会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的意思是可能有两个或更多
Imean that there might be two or more
XXXConverter extends ReflectionConverter
这里可能返回true
public boolean canConvert(Class aClass)
同一班级
推荐答案
一个类只能使用一个转换器.
Only one converter will be used for a class.
如果您注册多个具有相同优先级的转换器,则将使用最近注册的一个.
If you register multiple converters with the same priority, then the most recently registered one will be used.
查看 DefaultConverterLookup
的源代码.
这篇关于如果多个转换器可以解组 xml,会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文