private static void setPersistenceDelegates(XMLEncoder encoder,
Class<?>[] types) {
if (types != null && types.length > 0) {
PersistenceDelegate persistenceDelegate = new EnumPersistenceDelegate();
for (int i = 0; i < types.length; i++) {
encoder.setPersistenceDelegate(types[i], persistenceDelegate);
}
}
// Handle "BiGDecimal" manually (has no default constructor)
encoder.setPersistenceDelegate(BigDecimal.class,
new BigDecimalPersistenceDelegate());
encoder.setPersistenceDelegate(byte[].class,
new ByteArrayPersistenceDelegate());
encoder.setPersistenceDelegate(UUID.class, new UUIDDelegate());
}
XMLSerializer.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:development
作者:
评论列表
文章目录