org.bson.BSON.getDecodingHooks()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中org.bson.BSON.getDecodingHooks()方法的一些代码示例,展示了BSON.getDecodingHooks()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BSON.getDecodingHooks()方法的具体详情如下:
包路径:org.bson.BSON
类名称:BSON
方法名:getDecodingHooks

BSON.getDecodingHooks介绍

[英]Returns the decoding hook(s) associated with the specific class
[中]

代码示例

代码示例来源:origin: org.mongodb/mongo-java-driver

/**
 * Remove a specific encoding hook for a specific class.  The {@code transformer} passed as the parameter must be {@code equals} to the
 * transformer to remove.
 *
 * @param clazz       the class to remove the decoding hook for
 * @param transformer the specific decoding hook to remove.
 */
public static void removeDecodingHook(final Class<?> clazz, final Transformer transformer) {
  getDecodingHooks(clazz).remove(transformer);
}

代码示例来源:origin: com.sequoiadb/sequoiadb-driver

/**
 * Remove a specific encoding hook for a specific class.
 */
public static void removeDecodingHook(Class c, Transformer t) {
  getDecodingHooks(c).remove(t);
}

相关文章