當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。