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