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


Java Assisted类代码示例

本文整理汇总了Java中com.google.inject.assistedinject.Assisted的典型用法代码示例。如果您正苦于以下问题:Java Assisted类的具体用法?Java Assisted怎么用?Java Assisted使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Assisted类属于com.google.inject.assistedinject包,在下文中一共展示了Assisted类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: WindowsEventlogInputConfiguration

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@Inject
public WindowsEventlogInputConfiguration(@Assisted String id,
                                         @Assisted Config config,
                                         WindowsEventlogInput.Factory inputFactory) {
    super(id, config);
    this.inputFactory = inputFactory;

    if (config.hasPath("source-name")) {
        this.sourceName = config.getString("source-name");
    } else {
        this.sourceName = "Application";
    }

    if (config.hasPath("poll-interval")) {
        this.pollInterval = config.getDuration("poll-interval", TimeUnit.MILLISECONDS);
    } else {
        this.pollInterval = 1000L;
    }
}
 
开发者ID:DevOpsStudio,项目名称:Re-Collector,代码行数:20,代码来源:WindowsEventlogInputConfiguration.java

示例2: BuildContext

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
/**
 * Constructs a new {@link BuildContext}.
 *
 * @param appYaml configuration object provided by the user
 * @param workspaceDir the directory in which the build will take place
 * @param disableSourceBuild whether or not source builds should be disabled
 */
@Inject
@VisibleForTesting
public BuildContext(@Assisted AppYaml appYaml, @Assisted Path workspaceDir,
    @DisableSourceBuild boolean disableSourceBuild) {
  Preconditions.checkArgument(Files.isDirectory(workspaceDir));

  this.appYaml = appYaml;
  this.workspaceDir = workspaceDir;
  this.dockerfile = new StringLineAppender();
  // dockerignore should always include itself and the dockerfile
  this.dockerignore = new StringLineAppender(DOCKERFILE_NAME, DOCKERIGNORE_NAME);
  this.disableSourceBuild = disableSourceBuild;

  buildArtifactLocation = Optional.empty();
}
 
开发者ID:GoogleCloudPlatform,项目名称:runtime-builder-java,代码行数:23,代码来源:BuildContext.java

示例3: S3Transport

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
public S3Transport(@Assisted final Configuration configuration,
                   final EventBus serverEventBus,
                   final ServerStatus serverStatus,
                   LocalMetricRegistry localRegistry) {
    super(serverEventBus, configuration);
    this.serverStatus = serverStatus;
    this.localRegistry = localRegistry;
}
 
开发者ID:sherzberg,项目名称:graylog-plugin-s3,代码行数:10,代码来源:S3Transport.java

示例4: NewClassCommandAction

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@Inject
public NewClassCommandAction(@Nonnull Project project,
                             @Nonnull @Assisted("Name") String name,
                             @Nonnull @Assisted("Json") String json,
                             @Nonnull @Assisted PsiDirectory directory,
                             @Nonnull @Assisted JavaConverter converter) {
    super(project);
    this.fileFactory = PsiFileFactory.getInstance(project);
    this.directoryService = JavaDirectoryService.getInstance();
    this.name = Preconditions.checkNotNull(name);
    this.json = Preconditions.checkNotNull(json);
    this.directory = Preconditions.checkNotNull(directory);
    this.converter = Preconditions.checkNotNull(converter);
}
 
开发者ID:t28hub,项目名称:json2java4idea,代码行数:15,代码来源:NewClassCommandAction.java

示例5: DatabaseInputConfiguration

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@Inject
public DatabaseInputConfiguration(@Assisted String id,
                                  @Assisted Config config,
                                  DatabaseInput.Factory inputFactory) {
    super(id, config);
    this.inputFactory = inputFactory;
    if (config.hasPath("db-driver")) {
        this.dbDriver = config.getString("db-driver");
    }
    if (config.hasPath("db-connection-url")) {
        this.dbConnectionUrl = config.getString("db-connection-url");
    }
    if (config.hasPath("sql")) {
        this.sql = config.getString("sql");
    }
    if (config.hasPath("key-type")) {
        this.keytype = config.getString("key-type");
    }
    if (config.hasPath("id-field")) {
        this.idfield = config.getString("id-field");
    }
    if (config.hasPath("db-driver-path")) {
        this.dbDriverPath = config.getString("db-driver-path");
    }
    if (config.hasPath("init-sql")) {
        this.initSql = config.getString("init-sql");
    }
    if (config.hasPath("db-user")) {
        this.dbUser = config.getString("db-user");
    }
    if (config.hasPath("db-password")) {
        this.dbPassword = config.getString("db-password");
    }
    if (config.hasPath("db-sync-time")) {
        this.dbSyncTime = config.getInt("db-sync-time");
    } else {
        this.dbSyncTime = 1;
    }
}
 
开发者ID:DevOpsStudio,项目名称:Re-Collector,代码行数:40,代码来源:DatabaseInputConfiguration.java

示例6: TaxonomyEditorImpl

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
public TaxonomyEditorImpl(@Assisted Taxonomy entity, @Assisted("stagingUuid") @Nullable String stagingUuid,
	@Assisted("lockId") @Nullable String lockId, @Assisted("editing") boolean editing,
	@Assisted("importing") boolean importing)
{
	super(entity, stagingUuid, lockId, editing, importing);
}
 
开发者ID:equella,项目名称:Equella,代码行数:8,代码来源:TaxonomyEditorImpl.java

示例7: CourseEditorImpl

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
public CourseEditorImpl(@Assisted CourseInfo course, @Assisted("stagingUuid") @Nullable String stagingUuid,
	@Assisted("lockId") @Nullable String lockId, @Assisted("editing") boolean editing,
	@Assisted("importing") boolean importing)
{
	super(course, stagingUuid, lockId, editing, importing);
}
 
开发者ID:equella,项目名称:Equella,代码行数:8,代码来源:CourseEditorImpl.java

示例8: SaveNoSaveScript

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
protected SaveNoSaveScript(@Assisted boolean noSaveScript)
{
	super();
	this.noSaveScript = noSaveScript;
	setNoSaveScript(noSaveScript);
}
 
开发者ID:equella,项目名称:Equella,代码行数:8,代码来源:SaveNoSaveScript.java

示例9: EntryDescriptionSoundController

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@Inject
public EntryDescriptionSoundController(@Assisted ExplanationView explanationView,
                                       DescriptionSoundController descriptionSoundController) {

    this.descriptionSoundController = descriptionSoundController;
    this.explanationView = explanationView;

}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:9,代码来源:EntryDescriptionSoundController.java

示例10: LtiConsumerEditorImpl

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
public LtiConsumerEditorImpl(@Assisted LtiConsumer entity, @Assisted("stagingUuid") @Nullable String stagingUuid,
	@Assisted("lockId") @Nullable String lockId, @Assisted("editing") boolean editing,
	@Assisted("importing") boolean importing)
{
	super(entity, stagingUuid, lockId, editing, importing);
}
 
开发者ID:equella,项目名称:Equella,代码行数:8,代码来源:LtiConsumerEditorImpl.java

示例11: SaveNoIndexingOperation

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
protected SaveNoIndexingOperation(@Assisted boolean noAutoArchive, @Assisted @Nullable String stagingID)
{
	super(true);
	setNoAutoArchive(noAutoArchive);
	this.stagingID = stagingID;
}
 
开发者ID:equella,项目名称:Equella,代码行数:8,代码来源:SaveNoIndexingOperation.java

示例12: MongoDBClientBase

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
/**
 * Constructs a MongoDB client instance.
 *
 * This is private so it can only be instantiated via DI (using Guice).
 *
 * @param server    server hostname or ip
 * @param port      port number for mongodb service
 * @param dbName    name of db to use
 */
@Inject
public MongoDBClientBase(@Assisted("server") String server, @Assisted("port") int port, @Assisted("dbName") String dbName) {
    this.server = server;
    this.port = port;
    this.dbName = dbName;
    mongoClient = new MongoClient(server, port);

    morphia = new Morphia();
    //morphia.mapPackageFromClass(Service.class);
    morphiaDatastore = morphia.createDatastore(mongoClient, dbName);
    morphiaDatastore.ensureIndexes();
}
 
开发者ID:sjsucohort6,项目名称:amigo-chatbot,代码行数:22,代码来源:MongoDBClientBase.java

示例13: TouchRecognition

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
public TouchRecognition(@Assisted("listenOn") Widget listenOn, @Assisted("emulateClickAsTouch") Boolean emulateClickAsTouch,
                        @Assisted("globalTouchEnd") Boolean globalTouchEnd, TouchHandlerProvider touchHandlerProvider,
                        PlayerContentView playerContentView) {
    this.listenOn = listenOn;
    this.emulateClickAsTouch = emulateClickAsTouch;
    this.globalTouchEnd = globalTouchEnd;
    this.touchHandlerInitializer = touchHandlerProvider.getTouchHandlersInitializer();
    this.playerContentView = playerContentView;
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:11,代码来源:TouchRecognition.java

示例14: Team

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
/** Construct a Team instance with the necessary information.
 * @param info Defaults to use for name and color.
 * @param match Match this team is in.
 * @param joinConfiguration
 * @param teamConfiguration
 */
@Inject Team(@Assisted TeamFactory info, Match match, JoinConfiguration joinConfiguration, TeamConfiguration teamConfiguration) {
    super(match);
    this.info = info;
    this.joinConfiguration = joinConfiguration;
    this.teamConfiguration = teamConfiguration;
}
 
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:13,代码来源:Team.java

示例15: RawNsqInput

import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
public RawNsqInput(MetricRegistry metricRegistry,
                   @Assisted Configuration configuration,
                   NsqTransport.Factory transportFactory,
                   RawCodec.Factory codecFactory,
                   LocalMetricRegistry localRegistry,
                   Config config, Descriptor descriptor,
                   ServerStatus serverStatus) {
    super(metricRegistry, configuration, transportFactory.create(configuration), localRegistry,
            codecFactory.create(configuration), config, descriptor, serverStatus);
}
 
开发者ID:condevtec,项目名称:graylog-plugin-nsq,代码行数:12,代码来源:RawNsqInput.java


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