为什么要实现Xstream中的shouldSerializeMember 财富值94

2016-10-12 10:56发布

请问这两块代码是什么意思, 能详细的说下吗,谢谢

        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);                     }                 };             }         };
3条回答

没用过XStream,看样子是个xml解析器?

一周热门 更多>