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

项目:graylog-plugin-s3    文件:S3Input.java   
@AssistedInject
public S3Input(@Assisted Configuration configuration,
               MetricRegistry metricRegistry,
               S3Transport.Factory transport,
               LocalMetricRegistry localRegistry,
               S3Codec.Factory codec,
               Config config,
               Descriptor descriptor,
               ServerStatus serverStatus) {
    super(
            metricRegistry,
            configuration,
            transport.create(configuration),
            localRegistry,
            codec.create(configuration),
            config,
            descriptor,
            serverStatus);
}
项目: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;
}
项目: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;
}
项目:Equella    文件:SaveOperation.java   
@AssistedInject
protected SaveOperation(@Assisted boolean unlock, @Assisted("pre") List<WorkflowOperation> preSaveOperations,
    @Assisted("post") List<WorkflowOperation> postSaveOperations)
{
    this.unlock = unlock;
    this.preSaveOperations = preSaveOperations;
    this.postSaveOperations = postSaveOperations;
}
项目: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    文件:OAuthEditorImpl.java   
@AssistedInject
public OAuthEditorImpl(@Assisted OAuthClient 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    文件:UnusedContentCleanupOperation.java   
@AssistedInject
private UnusedContentCleanupOperation()
{
    this.metadataHtmls = null;
}
项目:Equella    文件:EditMyContentOperation.java   
@AssistedInject
private EditMyContentOperation(@Assisted MyContentFields fields, @Assisted @Nullable String filename,
    @Assisted @Nullable InputStream inputStream, @Assisted("staginguuid") @Nullable String stagingUuid,
    @Assisted("remove") boolean removeExistingAttachments, @Assisted("use") boolean useExistingAttachment)
{
    this.fields = fields;
    this.inputStream = inputStream;
    this.filename = filename;
    this.stagingUuid = stagingUuid;
    this.removeExistingAttachments = removeExistingAttachments;
    this.useExistingAttachment = useExistingAttachment;
}
项目:Equella    文件:CollectionEditorImpl.java   
@AssistedInject
public CollectionEditorImpl(@Assisted ItemDefinition collection,
    @Assisted("stagingUuid") @Nullable String stagingUuid, @Assisted("lockId") @Nullable String lockId,
    @Assisted("editing") boolean editing, @Assisted("importing") boolean importing)
{
    super(collection, stagingUuid, lockId, editing, importing);
}
项目:Equella    文件:SchemaEditorImpl.java   
@AssistedInject
public SchemaEditorImpl(@Assisted Schema schema, @Assisted("stagingUuid") @Nullable String stagingUuid,
    @Assisted("lockId") @Nullable String lockId, @Assisted("editing") boolean editing,
    @Assisted("importing") boolean importing)
{
    super(schema, stagingUuid, lockId, editing, importing);
}
项目:Equella    文件:ConnectorEditorImpl.java   
@AssistedInject
public ConnectorEditorImpl(@Assisted Connector 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    文件:SaveNoSaveScript.java   
@AssistedInject
protected SaveNoSaveScript(@Assisted boolean noSaveScript)
{
    super();
    this.noSaveScript = noSaveScript;
    setNoSaveScript(noSaveScript);
}
项目: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    文件:TaskApproveOperation.java   
@AssistedInject
public TaskApproveOperation(@Assisted("message") String message,
    @Assisted("acceptAllUsers") boolean acceptAllUsers)
{
    this.message = message;
    this.acceptAllUsers = acceptAllUsers;
}
项目:Equella    文件:BackgroundIndexerImpl.java   
@AssistedInject
public BackgroundIndexerImpl(@Assisted long schemaId, SchemaDataSourceService schemaService)
{
    this.schemaId = schemaId;
    this.schemaService = schemaService;
    dataSource = schemaService.getDataSourceForId(schemaId);
}
项目:graylog-plugin-alert-conditional-count    文件:ConditionalCountAlertCondition.java   
@AssistedInject
public ConditionalCountAlertCondition(Searches searches,
                                       Configuration configuration,
                                       @Assisted Stream stream,
                                       @Nullable @Assisted("id") String id,
                                       @Assisted DateTime createdAt,
                                       @Assisted("userid") String creatorUserId,
                                       @Assisted Map<String, Object> parameters,
                                       @Assisted("title") @Nullable String title) {
    super(stream, id, ConditionalCountAlertCondition.class.getCanonicalName(), createdAt, creatorUserId, parameters, title);
    this.searches = searches;
    this.configuration = configuration;
    this.query = (String) parameters.get("query");
    this.time = Tools.getNumber(parameters.get("time"), 5).intValue();

    final String thresholdType = (String) parameters.get("threshold_type");
    final String upperCaseThresholdType = thresholdType.toUpperCase(Locale.ENGLISH);

    if (!thresholdType.equals(upperCaseThresholdType)) {
        final HashMap<String, Object> updatedParameters = new HashMap<>();
        updatedParameters.putAll(parameters);
        updatedParameters.put("threshold_type", upperCaseThresholdType);
        super.setParameters(updatedParameters);
    }
    this.thresholdType = ThresholdType.valueOf(upperCaseThresholdType);
    this.threshold = Tools.getNumber(parameters.get("threshold"), 0).intValue();
}
项目:Equella    文件:ItemCommentServiceImpl.java   
@AssistedInject
public AddCommentOperation(@Assisted int rating, @Assisted boolean anonymous, @Assisted("comment") String comment,
    @Assisted("userId") String userId)
{
    this.rating = rating;
    this.anonymous = anonymous;
    this.commentText = comment;
    this.userId = userId;
}
项目: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    文件: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;
}
项目:Equella    文件:InlineChoiceInteractionRenderer.java   
@AssistedInject
protected InlineChoiceInteractionRenderer(@Assisted InlineChoiceInteraction model,
    @Assisted QtiViewerContext context)
{
    super(model, context);
    this.model = model;
}
项目:Equella    文件:AcceptOperation.java   
@AssistedInject
private AcceptOperation(@Assisted("taskId") String taskId, @Assisted("comment") @Nullable String message,
    @Assisted("messageUuid") @Nullable String messageUuid)
{
    super(taskId);
    this.message = message;
    this.messageUuid = messageUuid;
}
项目:Equella    文件:RolloverOperation.java   
@AssistedInject
public RolloverOperation(@Assisted long courseId, @Assisted("from") Date from, @Assisted("until") Date until)
{
    super();
    this.courseId = courseId;
    this.from = from;
    this.until = until;
}
项目:Equella    文件:MoveContentOperation.java   
@AssistedInject
public MoveContentOperation(@Assisted("courseId") String courseId, @Assisted("locationId") String locationId)
{
    super();
    this.courseId = courseId;
    this.locationId = locationId;
}
项目:empiria.player    文件:TouchRecognition.java   
@AssistedInject
public TouchRecognition(@Assisted("listenOn") Widget listenOn, @Assisted("emulateClickAsTouch") Boolean emulateClickAsTouch,
                        TouchHandlerProvider touchHandlersProvider, PlayerContentView playerContentView) {
    this(listenOn, emulateClickAsTouch, false, touchHandlersProvider, playerContentView);
}
项目:empiria.player    文件:FactoryBinding.java   
/**
 * Finds a constructor suitable for the method. If the implementation contained any constructors marked with {@link AssistedInject}, this requires all
 * {@link Assisted} parameters to exactly match the parameters (in any order) listed in the method. Otherwise, if no {@link AssistedInject} constructors
 * exist, this will default to looking for a {@literal @}{@link Inject} constructor.
 */
private Constructor findMatchingConstructor(Method method, TypeLiteral<?> implementation, List<Key<?>> paramList, Errors errors) throws ErrorsException {
    Constructor<?> matchingConstructor = null;
    boolean anyAssistedInjectConstructors = false;

    // Look for AssistedInject constructors...
    for (Constructor<?> constructor : implementation.getRawType().getDeclaredConstructors()) {
        if (constructor.isAnnotationPresent(AssistedInject.class)) {
            anyAssistedInjectConstructors = true;

            if (constructorHasMatchingParams(implementation, constructor, paramList, errors)) {
                if (matchingConstructor != null) {
                    errors.addMessage(PrettyPrinter.format("%s has more than one constructor annotated with @AssistedInject "
                            + "that matches the parameters in method %s.", implementation, method));
                    return null;
                } else {
                    matchingConstructor = constructor;
                }
            }
        }
    }

    if (matchingConstructor != null) {
        return matchingConstructor;
    }

    if (anyAssistedInjectConstructors) {
        errors.addMessage(PrettyPrinter.format("%s has @AssistedInject constructors, but none of them match the " + "parameters in method %s.",
                implementation, method));
        return null;
    }

    // Look for @Inject constructors...
    Constructor<?> injectConstructor = (Constructor) InjectionPoint.forConstructorOf(implementation).getMember();

    if (injectConstructorHasMatchingParams(implementation, injectConstructor, paramList, errors)) {
        return injectConstructor;
    }

    // No matching constructor exists, complain.
    errors.addMessage(PrettyPrinter.format("%s has no constructors matching the parameters in method %s.", implementation, method));
    return null;
}
项目:Equella    文件:AssignOperation.java   
@AssistedInject
public AssignOperation(@Assisted String taskId)
{
    super(taskId);
}
项目:Equella    文件:EndAttemptInteractionRenderer.java   
@AssistedInject
public EndAttemptInteractionRenderer(@Assisted EndAttemptInteraction model, @Assisted QtiViewerContext context)
{
    super(model, context);
    this.model = model;
}
项目:Equella    文件:ModifyNotificationsOperation.java   
@AssistedInject
private ModifyNotificationsOperation(@Assisted Set<String> userIds)
{
    this.userIds = userIds;
}
项目:Equella    文件:MatchInteractionRenderer.java   
@AssistedInject
protected MatchInteractionRenderer(@Assisted MatchInteraction model, @Assisted QtiViewerContext context)
{
    super(model, context);
}
项目:Equella    文件:MigrateTask.java   
@AssistedInject
public MigrateTask(@Assisted long schemaId, @Assisted boolean system)
{
    this.schemaId = schemaId;
    this.system = system;
}
项目:Equella    文件:LtiConsumerEditorImpl.java   
@AssistedInject
public LtiConsumerEditorImpl(@Assisted LtiConsumer entity, @Assisted("stagingUuid") @Nullable String stagingUuid,
    @Assisted("importing") boolean importing)
{
    this(entity, stagingUuid, null, false, importing);
}
项目:Equella    文件:WizardStateOperation.java   
@AssistedInject
protected WizardStateOperation(@Assisted WizardState state)
{
    this.state = state;
}
项目:Equella    文件:RefreshCollectionItemDataFilter.java   
@AssistedInject
protected RefreshCollectionItemDataFilter(@Assisted long collectionId)
{
    this.collectionId = collectionId;
}
项目:Equella    文件:WorkflowEditorImpl.java   
@AssistedInject
public WorkflowEditorImpl(@Assisted Workflow entity, @Assisted("stagingUuid") @Nullable String stagingUuid,
    @Assisted("importing") boolean importing)
{
    this(entity, stagingUuid, null, false, importing);
}
项目:Equella    文件:DynaCollectionEditorImpl.java   
@AssistedInject
public DynaCollectionEditorImpl(@Assisted DynaCollection collection,
    @Assisted("stagingUuid") @Nullable String stagingUuid, @Assisted("importing") boolean importing)
{
    this(collection, stagingUuid, null, false, importing);
}
项目:Equella    文件:CollectionEditorImpl.java   
@AssistedInject
public CollectionEditorImpl(@Assisted ItemDefinition collection,
    @Assisted("stagingUuid") @Nullable String stagingUuid, @Assisted("importing") boolean importing)
{
    this(collection, stagingUuid, null, false, importing);
}
项目:Equella    文件:CloneOperation.java   
/**
 * Clone in the same item definition.
 */
@AssistedInject
private CloneOperation(@Assisted("copyAttachments") boolean copyAttachments, @Assisted("submit") boolean submit)
{
    this(null, copyAttachments, submit);
}
项目:Equella    文件:UnusedContentCleanupOperation.java   
@AssistedInject
private UnusedContentCleanupOperation(@Assisted Collection<String> metadataHtmls)
{
    this.metadataHtmls = metadataHtmls;
}
项目:Equella    文件:SchemaEditorImpl.java   
@AssistedInject
public SchemaEditorImpl(@Assisted Schema schema, @Assisted("stagingUuid") @Nullable String stagingUuid,
    @Assisted("importing") boolean importing)
{
    this(schema, stagingUuid, null, false, importing);
}
项目:Equella    文件:DateRenderer.java   
@AssistedInject
protected DateRenderer(@Assisted Date date, ConfigurationService configurationService,
    UserPreferenceService userPreferenceService)
{
    this(date, false, configurationService, userPreferenceService);
}