Java 类com.google.inject.Inject 实例源码

项目:NoticeDog    文件:OverlayNotificationController.java   
@Inject
void init() {
    this.notificationBarView = (OverlayNotificationBarView) ((LayoutInflater) this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.overlay_notification_bar, null);
    this.notificationTouchListener = new View(this.context);
    this.notificationTouchListener.setOnTouchListener(new OnTouchListener() {
        public boolean onTouch(View v, MotionEvent event) {
            return OverlayNotificationController.this.notificationBarView.dispatchTouchEvent(event);
        }
    });
    this.notificationBarView.addListener((Object) this, new NotificationViewListener() {
        public void onNotificationViewClosed() {
            OverlayNotificationController.this.removeFromWindow();
            OverlayNotificationController.this.fireOnNotificationClosed();
        }
    });
}
项目:abhot    文件:HealthCheckServiceImpl.java   
@Inject
public HealthCheckServiceImpl(Injector injector)
{
    checkNotNull(injector);

    Map<Key<?>, Binding<?>> bindings = injector.getAllBindings();

    for (Key<?> key : bindings.keySet())
    {
        Class<?> bindingClass = key.getTypeLiteral().getRawType();
        if (HealthStatus.class.isAssignableFrom(bindingClass))
        {
            checks.add((HealthStatus) injector.getInstance(bindingClass));
        }
    }
}
项目:TakinRPC    文件:TccProvider.java   
@SuppressWarnings("unchecked")
@Inject
private TccProvider() {
    ServiceInfos serviceInfos = GuiceDI.getInstance(Scaner.class).getContractInfo();
    List<SessionBean> sessionBeanList = serviceInfos.getSessionBeanList();
    if (CollectionUtil.isNotEmpty(sessionBeanList)) {
        for (SessionBean bean : sessionBeanList) {
            logger.info(JSON.toJSONString(bean));
            if (bean.getImplClass().getCls().isAnnotationPresent(Compensable.class)) {
                Compensable compenanno = (Compensable) bean.getImplClass().getCls().getAnnotation(Compensable.class);
                logger.info(JSON.toJSONString(compenanno));
                compenMap.put(compenanno.interfaceClass(), new Tcc(compenanno.cancellableKey(), compenanno.confirmableKey()));
            }
        }
    }
}
项目:convertigo-che-assembly    文件:TextEditorsViewExtension.java   
@Inject
private void configureActions(
        final ActionManager actionManager,
        final ActiveTextEditorsAction activeTextEditorsAction,
        final MultipleMethodFileIdentifier multipleMethodFileIdentifier) {
    actionManager.registerAction(ActiveTextEditorsAction.ACTION_ID, activeTextEditorsAction);

       final List<String> contentTypes = makeList("application/javascript", "text/javascript");

       // Add JS highlight and completion
    multipleMethodFileIdentifier.registerNewExtension(TextEditorsPrefix.C8O_JSCRIPT_STEP_EDITOR, contentTypes);
    multipleMethodFileIdentifier.registerNewExtension(TextEditorsPrefix.C8O_JSCRIPT_TRANSACTION_EDITOR, contentTypes);

    // For the moment, add XMl highlight for xsl files
    multipleMethodFileIdentifier.registerNewExtension("xsl", makeList("application/xml"));
}
项目:verify-matching-service-adapter    文件:FixedCertificateChainValidator.java   
@Inject
public FixedCertificateChainValidator(
        KeyStore trustStore,
        CertificateChainValidator certificateChainValidator) {
    this.trustStore = trustStore;
    this.certificateChainValidator = certificateChainValidator;
}
项目:gemoc-studio    文件:DslSyntacticSequencer.java   
@Inject
protected void init(IGrammarAccess access) {
    grammarAccess = (DslGrammarAccess) access;
    match_Dsl_LineFeedKeyword_7_q = new TokenAlias(false, true, grammarAccess.getDslAccess().getLineFeedKeyword_7());
    match_Dsl_SPACETerminalRuleCall_0_a = new TokenAlias(true, true, grammarAccess.getDslAccess().getSPACETerminalRuleCall_0());
    match_Dsl_SPACETerminalRuleCall_2_a = new TokenAlias(true, true, grammarAccess.getDslAccess().getSPACETerminalRuleCall_2());
    match_Dsl_SPACETerminalRuleCall_4_a = new TokenAlias(true, true, grammarAccess.getDslAccess().getSPACETerminalRuleCall_4());
    match_Dsl_SPACETerminalRuleCall_6_a = new TokenAlias(true, true, grammarAccess.getDslAccess().getSPACETerminalRuleCall_6());
    match_Entry_LineFeedKeyword_7_q = new TokenAlias(false, true, grammarAccess.getEntryAccess().getLineFeedKeyword_7());
    match_Entry_SPACETerminalRuleCall_0_a = new TokenAlias(true, true, grammarAccess.getEntryAccess().getSPACETerminalRuleCall_0());
    match_Entry_SPACETerminalRuleCall_2_a = new TokenAlias(true, true, grammarAccess.getEntryAccess().getSPACETerminalRuleCall_2());
    match_Entry_SPACETerminalRuleCall_4_a = new TokenAlias(true, true, grammarAccess.getEntryAccess().getSPACETerminalRuleCall_4());
    match_Entry_SPACETerminalRuleCall_6_a = new TokenAlias(true, true, grammarAccess.getEntryAccess().getSPACETerminalRuleCall_6());
}
项目:paraflow    文件:HDFSSplitManager.java   
@Inject
public HDFSSplitManager(
        HDFSConnectorId connectorId,
        MetaDataQuery metaDataQuer,
        FSFactory fsFactory)
{
    this.connectorId = requireNonNull(connectorId, "connectorId is null");
    this.metaDataQuer = requireNonNull(metaDataQuer, "metaServer is null");
    this.fsFactory = requireNonNull(fsFactory, "fsFactory is null");
}
项目:NoticeDog    文件:NotificationManager.java   
@Inject
private void start() {
    this.receiver = new NotificationManagerReceiver();
    IntentFilter filter = new IntentFilter();
    filter.addAction(NotificationService.INTENT_ACTION_EVENTS);
    this.context.registerReceiver(this.receiver, filter);
    this.keepNotificationsInDrawer = this.settings.getKeepNotificationsInDrawer();
    this.settings.registerSettingChangeListener(this);
    this.processors = this.appManager.getNotificationFilters();
    this.appManager.addListener(this);
    checkIfNotificationSerivceIsRunning();
}
项目:empiria.player    文件:DictionaryFileRequestCallback.java   
@Inject
public DictionaryFileRequestCallback(@Assisted int index, ExplanationListener explanationListener,
                                     EntryFactory entryFactory, Logger logger) {

    this.index = index;
    this.explanationListener = explanationListener;
    this.entryFactory = entryFactory;
    this.logger = logger;
}
项目:minebox    文件:NbdServer.java   
@VisibleForTesting
@Inject
public NbdServer(MinebdConfig config, SystemdUtil systemdUtil, ExportProvider exportProvider, EncyptionKeyProvider encyptionKeyProvider) {
    this.port = config.nbdPort;
    this.config = config;
    this.systemdUtil = systemdUtil;
    this.exportProvider = exportProvider;
    this.encyptionKeyProvider = encyptionKeyProvider;
}
项目:empiria.player    文件:DataSourceManager.java   
@Inject
public DataSourceManager(AssessmentDataSourceManager assessmentDataManager, ItemDataSourceCollectionManager itemDataCollectionManager,
                         StyleDataSourceLoader styleDataSourceLoader, ContentPreloader contentPreloader) {
    this.assessmentDataManager = assessmentDataManager;
    this.assessmentDataManager.setSkinListener(this);
    this.itemDataCollectionManager = itemDataCollectionManager;
    this.styleDataSourceLoader = styleDataSourceLoader;
    this.contentPreloader = contentPreloader;

    mode = DataSourceManagerMode.NONE;
    itemDataCollectionManager.setLoaderEventListener(this);
    libraryLoader = new LibraryLoader(this);
}
项目:presto-manager    文件:PrestoInformer.java   
@Inject
PrestoInformer(Client client, PrestoConfig config)
{
    this.client = requireNonNull(client);
    this.configFile = requireNonNull(config.getConfigDirectory())
            .resolve("config.properties");
}
项目: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();
}
项目:sig-seguimiento-vehiculos    文件:GraticuleTool.java   
@Inject
public GraticuleTool(GeoMap geoMap) {
    super(UIMessages.INSTANCE.graticuleToolText(), ImageProvider.INSTANCE
            .graticule(), geoMap);
    setToolTipConfig(createTooltipConfig(
            UIMessages.INSTANCE.graticuleToolText(),
            UIMessages.INSTANCE.graticuleToolTip(), Side.LEFT));
}
项目:tools    文件:MetaDataStatus.java   
@Inject
public MetaDataStatusProvider(
        @Named("parentDirs") List<String> parentDir,
        SerialNumberService serialNumberService) {

    this.parentDirs = parentDir;
    this.serialNumberService = serialNumberService;
}
项目:empiria.player    文件:MenuPresenter.java   
@Inject
public MenuPresenter(MenuView view, MenuStyleNameConstants styleNameConstants) {
    this.view = view;
    this.styleNameConstants = styleNameConstants;
    isHidden = true;
    view.addClickHandler(createClickCommand());
}
项目:OSWf-OSWorkflow-fork    文件:SimulatorModel.java   
@Inject
public SimulatorModel(OSWfServiceAsync service) {
    this.service = service;

    currentPIIDMap = new HashMap<String,Long>();
    inputs = new HashMap<String,String>(); 
}
项目:gw4e.project    文件:DSLPoliciesSyntacticSequencer.java   
@Inject
protected void init(IGrammarAccess access) {
    grammarAccess = (DSLPoliciesGrammarAccess) access;
    match_Model_NEWLINETerminalRuleCall_0_1_0_a = new TokenAlias(true, true, grammarAccess.getModelAccess().getNEWLINETerminalRuleCall_0_1_0());
    match_Model_NEWLINETerminalRuleCall_1_a = new TokenAlias(true, true, grammarAccess.getModelAccess().getNEWLINETerminalRuleCall_1());
    match_Model___NEWLINETerminalRuleCall_0_0_0_a_CommentParserRuleCall_0_0_1__q = new GroupAlias(false, true, new TokenAlias(true, true, grammarAccess.getModelAccess().getNEWLINETerminalRuleCall_0_0_0()), new TokenAlias(false, false, grammarAccess.getModelAccess().getCommentParserRuleCall_0_0_1()));
    match_PathGeneratorStopCondition_WSTerminalRuleCall_5_a = new TokenAlias(true, true, grammarAccess.getPathGeneratorStopConditionAccess().getWSTerminalRuleCall_5());
    match_XBlockExpression_SemicolonKeyword_2_1_q = new TokenAlias(false, true, grammarAccess.getXBlockExpressionAccess().getSemicolonKeyword_2_1());
    match_XExpressionInClosure_SemicolonKeyword_1_1_q = new TokenAlias(false, true, grammarAccess.getXExpressionInClosureAccess().getSemicolonKeyword_1_1());
    match_XFunctionTypeRef___LeftParenthesisKeyword_0_0_RightParenthesisKeyword_0_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getXFunctionTypeRefAccess().getLeftParenthesisKeyword_0_0()), new TokenAlias(false, false, grammarAccess.getXFunctionTypeRefAccess().getRightParenthesisKeyword_0_2()));
    match_XImportDeclaration_SemicolonKeyword_2_q = new TokenAlias(false, true, grammarAccess.getXImportDeclarationAccess().getSemicolonKeyword_2());
    match_XParenthesizedExpression_LeftParenthesisKeyword_0_a = new TokenAlias(true, true, grammarAccess.getXParenthesizedExpressionAccess().getLeftParenthesisKeyword_0());
    match_XParenthesizedExpression_LeftParenthesisKeyword_0_p = new TokenAlias(true, false, grammarAccess.getXParenthesizedExpressionAccess().getLeftParenthesisKeyword_0());
}
项目:Pogamut3    文件:UT2004HSServer.java   
@Inject
public UT2004HSServer(UT2004AgentParameters params,
        IAgentLogger agentLogger, IComponentBus bus,
        SocketConnection connection, UT2004WorldView worldView, IAct act) {
    super(params, agentLogger, bus, connection, worldView, act);
    getWorldView().addEventListener(BeginMessage.class,
            myBeginMessageListener);
    getWorldView().addEventListener(EndMessage.class, myEndMessageListener);
    getWorldView().addEventListener(PlayerJoinsGame.class,
            myPlayerJoinsGameMessageListener);
    getWorldView().addEventListener(PlayerLeft.class,
            myPlayerLeftMessageListener);
    getWorldView().addObjectListener(PlayerMessage.class, myPlayerListener);

    level = new LevelGeometryModule(

    new IUT2004ServerProvider() {

        @Override
        public void killServer() {
        }

        @Override
        public UT2004Server getServer() {
            return UT2004HSServer.this;
        }
    }, getWorldView(), getLogger());
}
项目:tools    文件:NbdServer.java   
@VisibleForTesting
@Inject
public NbdServer(MinebdConfig config, SystemdUtil systemdUtil, ExportProvider exportProvider, EncyptionKeyProvider encyptionKeyProvider) {
    this.port = config.nbdPort;
    this.config = config;
    this.systemdUtil = systemdUtil;
    this.exportProvider = exportProvider;
    this.encyptionKeyProvider = encyptionKeyProvider;
}
项目:tools    文件:StatusResource.java   
@Inject
public StatusResource(EncyptionKeyProvider encyptionKeyProvider
        , @Named("parentDirs") List<String> parentDirs
        , DownloadFactory downloadFactory
        , SerialNumberService serialNumberService) {

    this.encyptionKeyProvider = encyptionKeyProvider;
    this.parentDirs = parentDirs;
    this.downloadFactory = downloadFactory;
    this.serialNumberService = serialNumberService;
}
项目:sig-seguimiento-vehiculos    文件:AddLayerTool.java   
@Inject
public AddLayerTool(GeoMap geoMap) {
    super(UIMessages.INSTANCE.add(), ImageProvider.INSTANCE.addLayer());
    setToolTipConfig(createTooltipConfig(UIMessages.INSTANCE.add(),
            UIMessages.INSTANCE.addLayerToolTip(), Side.LEFT));

}
项目:NoticeDog    文件:SwipeViewManager.java   
@Inject
protected void start() throws Exception {
    super.start();
    Log.d(TAG, "start");
    constructRunnableSwitch();
    createSwipeLayoutView();
    createSwipeTabView();
    createLockscreenListener();
    this.receiver = new SwipeManagerReceiver();
    IntentFilter filter = new IntentFilter();
    filter.addAction(INTENT_ACTION_CMDS);
    filter.addAction("android.intent.action.CONFIGURATION_CHANGED");
    this.context.registerReceiver(this.receiver, filter);
}
项目:empiria.player    文件:VideoFullScreenMediaButton.java   
@Inject
public VideoFullScreenMediaButton(MediaStyleNameConstants styleNames, VideoFullScreenHelper fullScreenHelper, EventsBus eventsBus,
                                  Provider<VideoFullScreenMediaButton> buttonProvider, PageScopeFactory scopeFactory) {
    super(styleNames.QP_MEDIA_FULLSCREEN_BUTTON());

    this.fullScreenHelper = fullScreenHelper;
    this.eventsBus = eventsBus;
    this.buttonProvider = buttonProvider;
    this.scopeFactory = scopeFactory;
}
项目:empiria.player    文件:ModuleScopedLazyProvider.java   
@Inject
public ModuleScopedLazyProvider(Provider<T> instanceProvider, ModuleScopeStack moduleScopeStack) {
    this.instanceProvider = instanceProvider;
    this.moduleScopeStack = moduleScopeStack;

    currentTopContext = moduleScopeStack.getCurrentTopContext();
}
项目:empiria.player    文件:ExplorableImgWindowCanvas.java   
@Inject
public ExplorableImgWindowCanvas(TouchController touchController, TouchHandlerOnImageProvider touchHandlerOnImageProvider) {
    canvas = Canvas.createIfSupported();
    initWidget(uiBinder.createAndBindUi(this));
    context2d = canvas.getContext2d();
    this.touchController = touchController;
    touchHandlerInitializer = touchHandlerOnImageProvider.get();
}
项目:ja-micro    文件:SchemaMigrator.java   
@Inject
public SchemaMigrator(ServiceProperties props, DatabaseMigrationContributor hc,
                      ConnectionVerifier verifier, Flyway flyway) {
    this.serviceProps = props;
    this.healthCheck = hc;
    this.connectionVerifier = verifier;
    this.flyway = flyway;
}
项目:mynlp    文件:PlaceRecognition.java   
@Inject
public PlaceRecognition(PlaceDictionary placeDictionary, CoreDictionary coreDictionary) {
    this.personDictionary = placeDictionary;

    a_total_freq = placeDictionary.getTransformMatrixDictionary().getTotalFrequency(Z);
    defaultEnumFreqPair = new EnumFreqPair(Z, a_total_freq);

    place_word_id = coreDictionary.getWordID(CoreDictionary.TAG_PLACE);
    place_word_tag = CoreDictionary.TAG_PLACE;
    place_natureAttribute =
            coreDictionary.get(place_word_id);
}
项目:sig-seguimiento-vehiculos    文件:ZoomToSeletionTool.java   
@Inject
public ZoomToSeletionTool(final GeoMap geoMap, final LayerManagerWidget layerManager) {
    super(UIMessages.INSTANCE.zoomToSeletionToolText(),
            ImageProvider.INSTANCE.zoomToSelection(), layerManager);
    setToolTipConfig(createTooltipConfig(
            UIMessages.INSTANCE.zoomToSeletionToolText(),
            UIMessages.INSTANCE.zoomToSeletionToolTip(), Side.LEFT));
    this.geoMap = geoMap;
    setEnabled(false);
}
项目:empiria.player    文件:ChoiceModule.java   
@Inject
public ChoiceModule(ChoiceModuleStructure choiceStructure, @ModuleScoped ChoiceModuleModel moduleModel, @ModuleScoped ChoiceModulePresenter presenter) {
    this.choiceStructure = choiceStructure;
    this.moduleModel = moduleModel;
    this.presenter = presenter;
}
项目:empiria.player    文件:Instance.java   
@Inject
public Instance(Provider<T> provider) {
    this.provider = provider;
}
项目:mynlp    文件:NRDictionary.java   
@Inject
public NRDictionary(Environment environment) throws Exception {
    super(environment);
}
项目:convertigo-che-assembly    文件:CouchDBConnectorEditorProvider.java   
@Inject
public CouchDBConnectorEditorProvider(Provider<GraphicEditorsViewPresenter> graphicEditorsViewPesenter) {
    super(graphicEditorsViewPesenter, "couchDBConnectorEditor", "Couch DB Connector Editor");
}
项目:angel    文件:EnvironmentBlock.java   
@Inject
EnvironmentBlock(AMContext amctx) {
  amContext = amctx;
}
项目:abhot    文件:KairosDBJobFactory.java   
@Inject
public KairosDBJobFactory(Injector guice)
{
    this.guice = guice;
}
项目:empiria.player    文件:PositionInMediaStream.java   
@Inject
public PositionInMediaStream(MediaStyleNameConstants styleNames, ProgressUpdateLogic progressUpdateLogic, PageScopeFactory pageScopeFactory) {
    super(styleNames.QP_MEDIA_POSITIONINSTREAM());
    this.progressUpdateLogic = progressUpdateLogic;
    this.pageScopeFactory = pageScopeFactory;
}
项目:Amicus    文件:AmicusMagic.java   
@Inject
public AmicusMagic(@Nonnull final Game game) {
    super(game, "magic.conf");
}
项目:abhot    文件:CountAggregator.java   
@Inject
public CountAggregator(LongDataPointFactory dataPointFactory)
{
    m_dataPointFactory = dataPointFactory;
}
项目:che-archetypes    文件:SampleProjectType.java   
@Inject
public SampleProjectType() {
  super(X_PROJECT_TYPE_ID, "Sample Project Type", true, false, true);
  addConstantDefinition(LANGUAGE, "language", C_LANG);
  addVariableDefinition(COMPILER_VERSION_ATRIBUTE, "GCC compiler version", false);
}
项目:angel    文件:WorkerBlock.java   
@Inject
WorkerBlock(AMContext amctx) {
  amContext = amctx;
}