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


Java IntoSet类代码示例

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

示例2: staticSite

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@IntoSet
static StaticSiteServiceDefinition staticSite() {
  return new StaticSiteServiceDefinition.Builder()
      .classpathRoot("/org/curioswitch/eggworld/web")
      .build();
}
 
开发者ID:curioswitch,项目名称:curiostack,代码行数:8,代码来源:Main.java

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

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

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

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

示例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;
  }
}
 
开发者ID:google,项目名称:guice,代码行数:31,代码来源:DaggerMethodScanner.java

示例8: tinydancerProfilingProcessor

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@IntoSet
@Provides
static ProfilingProcessor tinydancerProfilingProcessor(final Context context,
                                                       @UnderTest final boolean underTest) {
    return new TinyDancerProfilingProcessor(context, underTest);
}
 
开发者ID:dmitrikudrenko,项目名称:MDRXL,代码行数:7,代码来源:ProfilingModule.java

示例9: provideLoggingInterceptor

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@IntoSet
public Interceptor provideLoggingInterceptor() {
    return new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY);
}
 
开发者ID:dmitrikudrenko,项目名称:MDRXL,代码行数:6,代码来源:NetworkModule.java

示例10: init

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@EagerInit
@IntoSet
static Object init(DSLContext dslContext) {
  return dslContext;
}
 
开发者ID:curioswitch,项目名称:curiostack,代码行数:7,代码来源:DatabaseModule.java

示例11: init

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Provides
@EagerInit
@IntoSet
static Object init(RedisClusterClient redisClient) {
  return redisClient;
}
 
开发者ID:curioswitch,项目名称:curiostack,代码行数:7,代码来源:RedisModule.java

示例12: servoModeCommand

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Binds
@Singleton
@IntoSet
@Named("MAIN")
public abstract Command servoModeCommand(ServoModeCommand command);
 
开发者ID:strykeforce,项目名称:thirdcoast,代码行数:6,代码来源:MenuModule.java

示例13: dioModeCommand

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Binds
@Singleton
@IntoSet
@Named("MAIN")
public abstract Command dioModeCommand(DioModeCommand command);
 
开发者ID:strykeforce,项目名称:thirdcoast,代码行数:6,代码来源:MenuModule.java

示例14: talonModeCommand

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Binds
@Singleton
@IntoSet
@Named("MAIN")
public abstract Command talonModeCommand(TalonModeCommand command);
 
开发者ID:strykeforce,项目名称:thirdcoast,代码行数:6,代码来源:MenuModule.java

示例15: quitCommand

import dagger.multibindings.IntoSet; //导入依赖的package包/类
@Binds
@Singleton
@IntoSet
@Named("MAIN")
public abstract Command quitCommand(QuitCommand command);
 
开发者ID:strykeforce,项目名称:thirdcoast,代码行数:6,代码来源:MenuModule.java


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