本文整理汇总了Java中dagger.multibindings.IntoSet类的典型用法代码示例。如果您正苦于以下问题:Java IntoSet类的具体用法?Java IntoSet怎么用?Java IntoSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntoSet类属于dagger.multibindings包,在下文中一共展示了IntoSet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: staticSite
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@IntoSet
StaticSiteServiceDefinition staticSite() {
return new StaticSiteServiceDefinition.Builder()
.classpathRoot("org/curioswitch/portal/client/web/")
.build();
}
示例2: staticSite
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@IntoSet
static StaticSiteServiceDefinition staticSite() {
return new StaticSiteServiceDefinition.Builder()
.classpathRoot("/org/curioswitch/eggworld/web")
.build();
}
示例3: provideProtocol
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Singleton
@Provides
@IntoSet
static FrontendProtocol provideProtocol(
ProxyConfig config,
@WhoisProtocol int whoisPort,
@WhoisProtocol ImmutableList<Provider<? extends ChannelHandler>> handlerProviders,
@HttpsRelayProtocol BackendProtocol.Builder backendProtocolBuilder) {
return Protocol.frontendBuilder()
.name(PROTOCOL_NAME)
.port(whoisPort)
.handlerProviders(handlerProviders)
.relayProtocol(backendProtocolBuilder.host(config.whois.relayHost).build())
.build();
}
示例4: provideProtocol
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Singleton
@Provides
@IntoSet
static FrontendProtocol provideProtocol(
@HealthCheckProtocol int healthCheckPort,
@HealthCheckProtocol ImmutableList<Provider<? extends ChannelHandler>> handlerProviders) {
return Protocol.frontendBuilder()
.name(PROTOCOL_NAME)
.port(healthCheckPort)
.isHealthCheck(true)
.handlerProviders(handlerProviders)
.build();
}
示例5: provideProtocol
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Singleton
@Provides
@IntoSet
static FrontendProtocol provideProtocol(
ProxyConfig config,
@EppProtocol int eppPort,
@EppProtocol ImmutableList<Provider<? extends ChannelHandler>> handlerProviders,
@HttpsRelayProtocol BackendProtocol.Builder backendProtocolBuilder) {
return Protocol.frontendBuilder()
.name(PROTOCOL_NAME)
.port(eppPort)
.handlerProviders(handlerProviders)
.relayProtocol(backendProtocolBuilder.host(config.epp.relayHost).build())
.build();
}
示例6: getProvidesType
import dagger.multibindings.IntoSet; //导入依赖的package包/类
public static Provides.Type getProvidesType(Method method) {
if (method.getAnnotation(IntoSet.class) != null) {
return Provides.Type.SET;
} else if (method.getAnnotation(ElementsIntoSet.class) != null) {
return Provides.Type.SET_VALUES;
} else if (method.getAnnotation(IntoMap.class) != null) {
return Provides.Type.MAP;
}
return method.getAnnotation(Provides.class).type();
}
示例7: prepareMethod
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Override
public <T> Key<T> prepareMethod(
Binder binder, Annotation rawAnnotation, Key<T> key, InjectionPoint injectionPoint) {
Method providesMethod = (Method) injectionPoint.getMember();
Provides annotation = (Provides) rawAnnotation;
if (providesMethod.isAnnotationPresent(IntoSet.class)) {
return processSetBinding(binder, key);
} else if (providesMethod.isAnnotationPresent(ElementsIntoSet.class)) {
binder.addError("@ElementsIntoSet contributions are not suppored by Guice.", providesMethod);
return key;
} else if (providesMethod.isAnnotationPresent(IntoMap.class)) {
/* TODO(cgruber) implement map bindings */
binder.addError("Map bindings are not yet supported.");
return key;
}
switch (annotation.type()) {
case UNIQUE:
return key;
case SET:
return processSetBinding(binder, key);
case SET_VALUES:
binder.addError(
Type.SET_VALUES.name() + " contributions are not supported by Guice.", providesMethod);
return key;
default:
binder.addError("Unknown @Provides type " + annotation.type() + ".", providesMethod);
return key;
}
}
示例8: tinydancerProfilingProcessor
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@IntoSet
@Provides
static ProfilingProcessor tinydancerProfilingProcessor(final Context context,
@UnderTest final boolean underTest) {
return new TinyDancerProfilingProcessor(context, underTest);
}
示例9: provideLoggingInterceptor
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@IntoSet
public Interceptor provideLoggingInterceptor() {
return new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY);
}
示例10: init
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@EagerInit
@IntoSet
static Object init(DSLContext dslContext) {
return dslContext;
}
示例11: init
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@EagerInit
@IntoSet
static Object init(RedisClusterClient redisClient) {
return redisClient;
}
示例12: servoModeCommand
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Binds
@Singleton
@IntoSet
@Named("MAIN")
public abstract Command servoModeCommand(ServoModeCommand command);
示例13: dioModeCommand
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Binds
@Singleton
@IntoSet
@Named("MAIN")
public abstract Command dioModeCommand(DioModeCommand command);
示例14: talonModeCommand
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Binds
@Singleton
@IntoSet
@Named("MAIN")
public abstract Command talonModeCommand(TalonModeCommand command);
示例15: quitCommand
import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Binds
@Singleton
@IntoSet
@Named("MAIN")
public abstract Command quitCommand(QuitCommand command);