MapBinder.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:Elasticsearch 作者:
/**
 * Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
 * {@link Map} that is itself bound with {@code annotation}.
 */
public static <K, V> MapBinder<K, V> newMapBinder(Binder binder,
                                                  TypeLiteral<K> keyType, TypeLiteral<V> valueType, Annotation annotation) {
    binder = binder.skipSources(MapBinder.class, RealMapBinder.class);
    return newMapBinder(binder, valueType,
            Key.get(mapOf(keyType, valueType), annotation),
            Key.get(mapOfProviderOf(keyType, valueType), annotation),
            Multibinder.newSetBinder(binder, entryOfProviderOf(keyType, valueType), annotation));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号