本文整理汇总了Java中com.google.inject.multibindings.MultibindingsTargetVisitor类的典型用法代码示例。如果您正苦于以下问题:Java MultibindingsTargetVisitor类的具体用法?Java MultibindingsTargetVisitor怎么用?Java MultibindingsTargetVisitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MultibindingsTargetVisitor类属于com.google.inject.multibindings包,在下文中一共展示了MultibindingsTargetVisitor类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: acceptExtensionVisitor
import com.google.inject.multibindings.MultibindingsTargetVisitor; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public <B, V> V acceptExtensionVisitor(
BindingTargetVisitor<B, V> visitor, ProviderInstanceBinding<? extends B> binding) {
if (visitor instanceof MultibindingsTargetVisitor) {
return ((MultibindingsTargetVisitor<Set<T>, V>) visitor).visit(this);
} else {
return visitor.visit(binding);
}
}
示例2: acceptExtensionVisitor
import com.google.inject.multibindings.MultibindingsTargetVisitor; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public Object acceptExtensionVisitor(
BindingTargetVisitor visitor, ProviderInstanceBinding binding) {
if (visitor instanceof MultibindingsTargetVisitor) {
return ((MultibindingsTargetVisitor) visitor).visit(this);
} else {
return visitor.visit(binding);
}
}
示例3: acceptExtensionVisitor
import com.google.inject.multibindings.MultibindingsTargetVisitor; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public <B, W> W acceptExtensionVisitor(
BindingTargetVisitor<B, W> visitor, ProviderInstanceBinding<? extends B> binding) {
if (visitor instanceof MultibindingsTargetVisitor) {
return ((MultibindingsTargetVisitor<Map<K, V>, W>) visitor).visit(this);
} else {
return visitor.visit(binding);
}
}