本文整理匯總了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);
}