本文整理汇总了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;
}
}
示例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();
}
示例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;
}
示例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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例8: SaveNoSaveScript
import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@AssistedInject
protected SaveNoSaveScript(@Assisted boolean noSaveScript)
{
super();
this.noSaveScript = noSaveScript;
setNoSaveScript(noSaveScript);
}
示例9: EntryDescriptionSoundController
import com.google.inject.assistedinject.Assisted; //导入依赖的package包/类
@Inject
public EntryDescriptionSoundController(@Assisted ExplanationView explanationView,
DescriptionSoundController descriptionSoundController) {
this.descriptionSoundController = descriptionSoundController;
this.explanationView = explanationView;
}
示例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);
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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);
}