当前位置: 首页>>代码示例>>Java>>正文


Java Binder.skipSources方法代码示例

本文整理汇总了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));
}
 
开发者ID:airlift,项目名称:drift,代码行数:11,代码来源:DriftClientBindingBuilder.java

示例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;
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:8,代码来源:Binders.java

示例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);
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:11,代码来源:SetBinder.java

示例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());
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:13,代码来源:TransformableBinder.java

示例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){};
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:6,代码来源:ModelListenerBinder.java

示例6: VBinderImpl

import com.google.inject.Binder; //导入方法依赖的package包/类
VBinderImpl(@NonNull final Binder binder) {
  this.binder = binder.skipSources(SKIPPED_SOURCES);
}
 
开发者ID:KyoriPowered,项目名称:violet,代码行数:4,代码来源:VBinder.java

示例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;
}
 
开发者ID:KyoriPowered,项目名称:violet,代码行数:6,代码来源:LazyBindingBuilder.java

示例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);
}
 
开发者ID:KyoriPowered,项目名称:violet,代码行数:6,代码来源:DuplexBinder.java


注:本文中的com.google.inject.Binder.skipSources方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。