本文整理汇总了Java中com.google.inject.Binder.skipSources方法的典型用法代码示例。如果您正苦于以下问题:Java Binder.skipSources方法的具体用法?Java Binder.skipSources怎么用?Java Binder.skipSources使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.inject.Binder
的用法示例。
在下文中一共展示了Binder.skipSources方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DriftClientBindingBuilder
import com.google.inject.Binder; //导入方法依赖的package包/类
DriftClientBindingBuilder(Binder binder, Annotation annotation, String prefix)
{
this.binder = binder.skipSources(getClass());
this.annotation = requireNonNull(annotation, "annotation is null");
this.prefix = requireNonNull(prefix, "prefix is null");
// add MethodInvocationFilter extension binding point
filterBinder();
// add ExceptionClassifier extension binding point
newOptionalBinder(binder, Key.get(ExceptionClassifier.class, annotation));
}
示例2: wrap
import com.google.inject.Binder; //导入方法依赖的package包/类
static Binders wrap(Binder binder) {
if(binder instanceof Binders) {
return (Binders) binder;
}
final Binder skipped = binder.skipSources(Binders.class, ForwardingBinder.class);
return () -> skipped;
}
示例3: SetBinder
import com.google.inject.Binder; //导入方法依赖的package包/类
protected SetBinder(Binder binder, @Nullable Key<T> key) {
if(key == null) {
key = Key.get(new ResolvableType<T>(){}.in(getClass()));
}
this.binder = binder.skipSources(SetBinder.class);
this.elementType = key.getTypeLiteral();
this.collectionType = new ResolvableType<Set<T>>(){}.with(new TypeArgument<T>(this.elementType){});
this.multibinder = Multibinder.newSetBinder(binder, key);
}
示例4: TransformableBinder
import com.google.inject.Binder; //导入方法依赖的package包/类
public TransformableBinder(Binder binder, @Nullable Key<T> keyOrNull) {
this.binder = binder.skipSources(TransformableBinder.class, TransformingProvider.class);
this.key = keyOrNull != null ? keyOrNull : Key.get(new ResolvableType<T>(){}.in(getClass()));
this.untransformedKey = Keys.get(key, new UntransformedImpl());
final TypeLiteral<Transformer<T>> transformerType = new ResolvableType<Transformer<T>>(){}.with(new TypeArgument<T>(key.getTypeLiteral()){});
final Annotation annotation = key.getAnnotation();
this.transformerSetKey = Keys.get(Types.setOf(transformerType), annotation);
this.transformerBinder = Multibinder.newSetBinder(this.binder, Keys.get(transformerType, annotation));
this.binder.install(new TransformingProvider());
}
示例5: ModelListenerBinder
import com.google.inject.Binder; //导入方法依赖的package包/类
public ModelListenerBinder(Binder binder) {
binder = binder.skipSources(ModelListenerBinder.class);
this.handlers = new TypeMapBinder<Model, ModelHandler>(binder){};
this.listeners = new SetBinder<ModelListener>(binder){};
}
示例6: VBinderImpl
import com.google.inject.Binder; //导入方法依赖的package包/类
VBinderImpl(@NonNull final Binder binder) {
this.binder = binder.skipSources(SKIPPED_SOURCES);
}
示例7: LazyBindingBuilder
import com.google.inject.Binder; //导入方法依赖的package包/类
LazyBindingBuilder(final Binder binder, final Key<T> key) {
this.binder = binder.skipSources(LazyBindingBuilder.class);
this.builder = this.binder.bind(new FriendlyTypeLiteral<Lazy<T>>() {}.where(new TypeArgument<T>(key) {}));
this.key = key;
}
示例8: DuplexBinderImpl
import com.google.inject.Binder; //导入方法依赖的package包/类
DuplexBinderImpl(final Binder publicBinder, final PrivateBinder privateBinder) {
this.publicBinder = publicBinder.skipSources(SKIPPED_SOURCES);
// Special case DuplexBinder to prevent creation of a new DuplexBinderImpl when skipping sources
this.privateBinder = (privateBinder instanceof DuplexBinder ? ((DuplexBinder) privateBinder).binder() : privateBinder).skipSources(SKIPPED_SOURCES);
}