请问这两块代码是什么意思, 能详细的说下吗,谢谢
xstream = new XStream(new DomDriver()){ @Override protected MapperWrapper wrapMapper(MapperWrapper next) { return new MapperWrapper(next) { @SuppressWarnings("rawtypes") @Override public boolean shouldSerializeMember(Class definedIn, String fieldName) { if (definedIn == Object.class) { return false; } return super.shouldSerializeMember(definedIn, fieldName); } }; } };
这段代码的作用是当对象发生变化时也可以顺利转化,否则当对象和xml对不上时会报错。