当前位置: 首页>>代码示例>>Java>>正文


Java Inject类代码示例

本文整理汇总了Java中com.google.inject.Inject的典型用法代码示例。如果您正苦于以下问题:Java Inject类的具体用法?Java Inject怎么用?Java Inject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Inject类属于com.google.inject包,在下文中一共展示了Inject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.google.inject.Inject; //导入依赖的package包/类
@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();
        }
    });
}
 
开发者ID:bunnyblue,项目名称:NoticeDog,代码行数:17,代码来源:OverlayNotificationController.java

示例2: HealthCheckServiceImpl

import com.google.inject.Inject; //导入依赖的package包/类
@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));
		}
	}
}
 
开发者ID:quqiangsheng,项目名称:abhot,代码行数:17,代码来源:HealthCheckServiceImpl.java

示例3: TccProvider

import com.google.inject.Inject; //导入依赖的package包/类
@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()));
            }
        }
    }
}
 
开发者ID:lemonJun,项目名称:TakinRPC,代码行数:17,代码来源:TccProvider.java

示例4: configureActions

import com.google.inject.Inject; //导入依赖的package包/类
@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"));
}
 
开发者ID:convertigo,项目名称:convertigo-che-assembly,代码行数:17,代码来源:TextEditorsViewExtension.java

示例5: FixedCertificateChainValidator

import com.google.inject.Inject; //导入依赖的package包/类
@Inject
public FixedCertificateChainValidator(
        KeyStore trustStore,
        CertificateChainValidator certificateChainValidator) {
    this.trustStore = trustStore;
    this.certificateChainValidator = certificateChainValidator;
}
 
开发者ID:alphagov,项目名称:verify-matching-service-adapter,代码行数:8,代码来源:FixedCertificateChainValidator.java

示例6: init

import com.google.inject.Inject; //导入依赖的package包/类
@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());
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:15,代码来源:DslSyntacticSequencer.java

示例7: HDFSSplitManager

import com.google.inject.Inject; //导入依赖的package包/类
@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");
}
 
开发者ID:dbiir,项目名称:paraflow,代码行数:11,代码来源:HDFSSplitManager.java

示例8: start

import com.google.inject.Inject; //导入依赖的package包/类
@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();
}
 
开发者ID:bunnyblue,项目名称:NoticeDog,代码行数:13,代码来源:NotificationManager.java

示例9: DictionaryFileRequestCallback

import com.google.inject.Inject; //导入依赖的package包/类
@Inject
public DictionaryFileRequestCallback(@Assisted int index, ExplanationListener explanationListener,
                                     EntryFactory entryFactory, Logger logger) {

    this.index = index;
    this.explanationListener = explanationListener;
    this.entryFactory = entryFactory;
    this.logger = logger;
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:10,代码来源:DictionaryFileRequestCallback.java

示例10: NbdServer

import com.google.inject.Inject; //导入依赖的package包/类
@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;
}
 
开发者ID:MineboxOS,项目名称:minebox,代码行数:10,代码来源:NbdServer.java

示例11: DataSourceManager

import com.google.inject.Inject; //导入依赖的package包/类
@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);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:14,代码来源:DataSourceManager.java

示例12: requireNonNull

import com.google.inject.Inject; //导入依赖的package包/类
@Inject
PrestoInformer(Client client, PrestoConfig config)
{
    this.client = requireNonNull(client);
    this.configFile = requireNonNull(config.getConfigDirectory())
            .resolve("config.properties");
}
 
开发者ID:prestodb,项目名称:presto-manager,代码行数:8,代码来源:PrestoInformer.java

示例13: ModuleFeedbackProcessor

import com.google.inject.Inject; //导入依赖的package包/类
@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();
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:13,代码来源:ModuleFeedbackProcessor.java

示例14: GraticuleTool

import com.google.inject.Inject; //导入依赖的package包/类
@Inject
public GraticuleTool(GeoMap geoMap) {
	super(UIMessages.INSTANCE.graticuleToolText(), ImageProvider.INSTANCE
			.graticule(), geoMap);
	setToolTipConfig(createTooltipConfig(
			UIMessages.INSTANCE.graticuleToolText(),
			UIMessages.INSTANCE.graticuleToolTip(), Side.LEFT));
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:9,代码来源:GraticuleTool.java

示例15: MetaDataStatusProvider

import com.google.inject.Inject; //导入依赖的package包/类
@Inject
public MetaDataStatusProvider(
        @Named("parentDirs") List<String> parentDir,
        SerialNumberService serialNumberService) {

    this.parentDirs = parentDir;
    this.serialNumberService = serialNumberService;
}
 
开发者ID:MineboxOS,项目名称:tools,代码行数:9,代码来源:MetaDataStatus.java


注:本文中的com.google.inject.Inject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。