Java 类com.google.inject.assistedinject.Assisted 实例源码

项目:Re-Collector    文件:WindowsEventlogInputConfiguration.java   
@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;
    }
}
项目:runtime-builder-java    文件:BuildContext.java   
/**
 * 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();
}
项目:graylog-plugin-s3    文件:S3Transport.java   
@AssistedInject
public S3Transport(@Assisted final Configuration configuration,
                   final EventBus serverEventBus,
                   final ServerStatus serverStatus,
                   LocalMetricRegistry localRegistry) {
    super(serverEventBus, configuration);
    this.serverStatus = serverStatus;
    this.localRegistry = localRegistry;
}
项目:json2java4idea    文件:NewClassCommandAction.java   
@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);
}
项目:Re-Collector    文件:DatabaseInputConfiguration.java   
@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;
    }
}
项目:Equella    文件:TaxonomyEditorImpl.java   
@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);
}
项目:Equella    文件:CourseEditorImpl.java   
@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);
}
项目:Equella    文件:SaveNoSaveScript.java   
@AssistedInject
protected SaveNoSaveScript(@Assisted boolean noSaveScript)
{
    super();
    this.noSaveScript = noSaveScript;
    setNoSaveScript(noSaveScript);
}
项目:empiria.player    文件:EntryDescriptionSoundController.java   
@Inject
public EntryDescriptionSoundController(@Assisted ExplanationView explanationView,
                                       DescriptionSoundController descriptionSoundController) {

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

}
项目:Equella    文件:LtiConsumerEditorImpl.java   
@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);
}
项目:Equella    文件:SaveNoIndexingOperation.java   
@AssistedInject
protected SaveNoIndexingOperation(@Assisted boolean noAutoArchive, @Assisted @Nullable String stagingID)
{
    super(true);
    setNoAutoArchive(noAutoArchive);
    this.stagingID = stagingID;
}
项目:amigo-chatbot    文件:MongoDBClientBase.java   
/**
 * 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();
}
项目:empiria.player    文件:TouchRecognition.java   
@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;
}
项目:ProjectAres    文件:Team.java   
/** 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;
}
项目:graylog-plugin-nsq    文件:RawNsqInput.java   
@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);
}
项目:Equella    文件:TaskListFilter.java   
@Inject
public TaskListFilter(SectionsController controller, @Assisted String identifier, @Assisted Assign assigned,
    @Assisted("mustModerate") boolean mustModerate, @Assisted("secondLevel") boolean secondLevel)
{
    this.identifier = identifier;
    this.assigned = assigned;
    this.mustModerate = mustModerate;
    this.secondLevel = secondLevel;
    this.sectionsController = controller;
}
项目:Equella    文件:ExportTask.java   
@Inject
public ExportTask(@Assisted UserState userState, @Assisted long exportId, @Assisted boolean withSecurity)
{
    this.userState = userState;
    this.exportId = exportId;
    this.withSecurity = withSecurity;
}
项目:empiria.player    文件:ConnectionItemImpl.java   
@Inject
public ConnectionItemImpl(ConnectionModuleFactory itemViewFactory, @Assisted InlineBodyGeneratorSocket socket, @Assisted PairChoiceBean bean,
                          @Assisted Column column) {
    this.bean = bean;
    this.column = column;
    view = column == Column.LEFT ? itemViewFactory.getConnectionItemViewLeft(bean, socket) : itemViewFactory.getConnectionItemViewRight(bean, socket);
}
项目:Equella    文件:InfoControlRenderer.java   
@AssistedInject
public InfoControlRenderer(@Assisted InfoControl model, @Assisted QtiViewerContext context)
{
    super(model, context);
    this.model = model;
    state.setId("hint");
}
项目:empiria.player    文件:VideoPlayerForBookshelfOnAndroid.java   
@Inject
public VideoPlayerForBookshelfOnAndroid(@Assisted VideoPlayer videoPlayer, FullscreenVideoConnector fullscreenVideoConnector,
                                        SourceForBookshelfFilter sourceForBookshelfFilter) {
    this.sources = sourceForBookshelfFilter.getFilteredSources(videoPlayer.getSources());
    this.playerId = videoPlayer.getId();
    this.fullscreenVideoConnector = fullscreenVideoConnector;
}
项目:graylog-plugin-alert-condition-delorean    文件:DeloreanAlertCondition.java   
@Override
DeloreanAlertCondition create(Stream stream,
                                       @Assisted("id") String id,
                                       DateTime createdAt,
                                       @Assisted("userid") String creatorUserId,
                                       Map<String, Object> parameters,
                                       @Assisted("title") @Nullable String title);
项目:empiria.player    文件:ModuleFeedbackProcessor.java   
@Inject
public ModuleFeedbackProcessor(@Assisted InlineBodyGeneratorSocket inlineBodyGeneratorSocket, FeedbackRegistry feedbackRegistry,
                               FeedbackConditionMatcher matcher, SoundActionProcessor soundProcessor, FeedbackPropertiesCollector propertiesCollector,
                               Provider<FeedbackActionCollector> feedbackActionCollectorProvider) {
    this.inlineBodyGeneratorSocket = inlineBodyGeneratorSocket;
    this.feedbackRegistry = feedbackRegistry;
    this.matcher = matcher;
    this.soundProcessor = soundProcessor;
    this.propertiesCollector = propertiesCollector;
    this.feedbackActionCollectorProvider = feedbackActionCollectorProvider;
    initializeFeedbackActionCollector();
}
项目:Equella    文件:ImportTask.java   
@Inject
public ImportTask(@Assisted UserState userState, @Assisted String xml, @Assisted long inTo,
    @Assisted("newids") boolean newids, @Assisted("useSecurity") boolean useSecurity)
{
    this.userState = userState;
    this.xml = xml;
    this.inTo = inTo;
    this.newids = newids;
    this.useSecurity = useSecurity;
}
项目:Equella    文件:CloneOperation.java   
/**
 * Clone to possibly a new item definition.
 * 
 * @param newItemDefUuid null indicates that it is in the same collection.
 */
@AssistedInject
private CloneOperation(@Assisted String newItemDefUuid, @Assisted("copyAttachments") boolean copyAttachments,
    @Assisted("submit") boolean submit)
{
    super(copyAttachments);
    this.newItemdefUuid = newItemDefUuid;
    this.submit = submit;
}
项目:Equella    文件:SimpleChoiceRenderer.java   
@AssistedInject
public SimpleChoiceRenderer(@Assisted SimpleChoice model, @Assisted QtiViewerContext context,
    @Assisted String name, @Assisted boolean multiple)
{
    super(model, context);
    this.model = model;
    this.multiple = multiple;
    this.name = name;
}
项目:empiria.player    文件:InlineBodyGenerator.java   
@Inject
public InlineBodyGenerator(@Assisted ModulesRegistrySocket mrs, @Assisted ModuleSocket moduleSocket, @Assisted DisplayContentOptions options,
                           @Assisted ParenthoodManager parenthood, TextStyleNameConstants styleNames, EventsBus eventsBus) {
    this.modulesRegistrySocket = mrs;
    this.options = options;
    this.moduleSocket = moduleSocket;
    this.parenthood = parenthood;
    this.styleNames = styleNames;
    this.eventsBus = eventsBus;
}
项目:Equella    文件:WorkflowCommentOperation.java   
@AssistedInject
private WorkflowCommentOperation(@Assisted("taskId") String taskId, @Assisted("comment") String msg,
    @Assisted("messageUuid") @Nullable String messageUuid)
{
    super(taskId);
    this.msg = msg;
    this.messageUuid = messageUuid;
}
项目:empiria.player    文件:StickieMinimizeMaximizeController.java   
@Inject
public StickieMinimizeMaximizeController(@Assisted IStickieProperties stickieProperties, MaximizedStickieSizeStorage maximizedStickieSizeStorage,
                                         StickieViewPositionFinder positionFinder) {
    this.stickieProperties = stickieProperties;
    this.maximizedStickieSizeStorage = maximizedStickieSizeStorage;
    this.positionFinder = positionFinder;
}
项目:ProjectAres    文件:LocalizedDocument.java   
@Inject LocalizedDocument(@Assisted("source") Path sourcePath, @Assisted("localized") Path localizedPath, DocumentParser<T> parser, PathWatcherService watcherService, LocalizedFileManager localizedFiles, DocumentBuilder builder, MapdevLogger mapdevLogger, MainThreadExecutor mainThread) {
    this.sourcePath = sourcePath;
    this.localizedPath = localizedPath;
    this.parser = parser;
    this.watcherService = watcherService;
    this.localizedFiles = localizedFiles;
    this.builder = builder;
    this.mapdevLogger = mapdevLogger;
    this.mainThread = mainThread;
}
项目:Equella    文件:BulkMoveContentOperation.java   
@Inject
public MoveContentOperationExecutor(@Assisted("courseId") String courseId,
    @Assisted("locationId") String locationId)
{
    this.courseId = courseId;
    this.locationId = locationId;
}
项目:Re-Collector    文件:GelfOutput.java   
@Inject
public GelfOutput(@Assisted GelfOutputConfiguration configuration) {
    this.configuration = configuration;
}
项目:Equella    文件:EndAttemptInteractionRenderer.java   
@AssistedInject
public EndAttemptInteractionRenderer(@Assisted EndAttemptInteraction model, @Assisted QtiViewerContext context)
{
    super(model, context);
    this.model = model;
}
项目:Equella    文件:LtiConsumerEditorImpl.java   
LtiConsumerEditorImpl createNewEditor(@Assisted LtiConsumer entity,
@Assisted("stagingUuid") @Nullable String stagingUuid, @Assisted("importing") boolean importing);
项目:Equella    文件:BulkWorkflowRejectTaskOperation.java   
@Inject
public RejectExecutor(@Assisted("message") String message)
{
    this.message = message;
}
项目:Equella    文件:XhtmlElementRenderer.java   
@AssistedInject
public XhtmlElementRenderer(@Assisted Dfn p, @Assisted QtiViewerContext context)
{
    this((QtiNode) p, context);
}
项目:ProjectAres    文件:DurationProperty.java   
@Inject private DurationProperty(@Assisted Element parent, @Assisted String name, PrimitiveParser<Duration> parser) {
    super(parent, name, parser);
}
项目:Equella    文件:XhtmlElementRenderer.java   
@AssistedInject
public XhtmlElementRenderer(@Assisted Small p, @Assisted QtiViewerContext context)
{
    this((QtiNode) p, context);
}
项目:Re-Collector    文件:FileInputConfiguration.java   
@Inject
public FileInputConfiguration(@Assisted String id,
                              @Assisted Config config,
                              FileInput.Factory inputFactory) {
    super(id, config);
    this.inputFactory = inputFactory;

    if (config.hasPath("path-glob-root") && config.hasPath("path-glob-pattern")) {
        this.path = new GlobPathSet(config.getString("path-glob-root"), config.getString("path-glob-pattern"));
    } else {
        if (config.hasPath("path")) {
            this.path = new SinglePathSet(config.getString("path"));
        }
    }

    if (config.hasPath("content-splitter")) {
        this.contentSplitter = config.getString("content-splitter").toUpperCase(Locale.getDefault());

    } else {
        this.contentSplitter = "NEWLINE";
    }
    if (config.hasPath("content-splitter-pattern")) {
        this.contentSplitterPattern = config.getString("content-splitter-pattern");
    } else {
        this.contentSplitterPattern = "";
    }
    if (config.hasPath("charset")) {
        this.charsetString = config.getString("charset");
    } else {
        this.charsetString = "UTF-8";
    }
    if (config.hasPath("reader-buffer-size")) {
        this.readerBufferSize = config.getInt("reader-buffer-size");
    } else {
        this.readerBufferSize = 102400;
    }
    if (config.hasPath("reader-interval")) {
        this.readerInterval = config.getDuration("reader-interval", TimeUnit.MILLISECONDS);
    } else {
        this.readerInterval = 100L;
    }
}
项目:universal-graph-client    文件:OperationFeederImpl.java   
@Inject
public OperationFeederImpl(GraphVisitor repository,
        @Assisted OperationPipeline operationsPipeline) {
    this.operationsPipeline = operationsPipeline;
    this.repository = repository;
}
项目:Equella    文件:TestFeedbackRenderer.java   
@AssistedInject
public TestFeedbackRenderer(@Assisted TestFeedback model, @Assisted QtiViewerContext context)
{
    super(model, context);
    this.model = model;
}