getImplementation(), new HashSet<Annotation>()); domDesc.setLoader(loader); domDescriptor = dc.addActiveDescriptor(domDesc, false); dc.addActiveDescriptor(alias, false); dc.addActiveDescriptor(alias, false);
/** * {@inheritDoc} * <p> * This method can be called only in the execution context of the {@link #configure()} * method. * </p> */ @Override public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws MultiException, IllegalArgumentException { return configuration().addActiveDescriptor(rawClass); }
/** * {@inheritDoc} * <p> * This method can be called only in the execution context of the {@link #configure()} * method. * </p> */ @Override public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws MultiException, IllegalArgumentException { return configuration().addActiveDescriptor(rawClass); }
/** * {@inheritDoc} * <p> * This method can be called only in the execution context of the {@link #configure()} * method. * </p> */ @Override public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws MultiException, IllegalArgumentException { return configuration().addActiveDescriptor(rawClass); }
@Override public <T> ActiveDescriptor<T> addActiveDescriptor(ActiveDescriptor<T> activeDescriptor, boolean requiresDeepCopy) throws IllegalArgumentException { return configuration().addActiveDescriptor(activeDescriptor, requiresDeepCopy); }
@Override public <T> ActiveDescriptor<T> addActiveDescriptor(ActiveDescriptor<T> activeDescriptor, boolean requiresDeepCopy) throws IllegalArgumentException { return configuration().addActiveDescriptor(activeDescriptor, requiresDeepCopy); }
@Override public <T> ActiveDescriptor<T> addActiveDescriptor(ActiveDescriptor<T> activeDescriptor, boolean requiresDeepCopy) throws IllegalArgumentException { return configuration().addActiveDescriptor(activeDescriptor, requiresDeepCopy); }
/** * {@inheritDoc} * <p> * This method can be called only in the execution context of the {@link #configure()} * method. * </p> */ @Override public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws MultiException, IllegalArgumentException { return configuration().addActiveDescriptor(rawClass); }
@Override public <T> ActiveDescriptor<T> addActiveDescriptor(ActiveDescriptor<T> activeDescriptor, boolean requiresDeepCopy) throws IllegalArgumentException { return configuration().addActiveDescriptor(activeDescriptor, requiresDeepCopy); }
.to(Populator.class).in(Singleton.class.getName()) .build()); configurator.addActiveDescriptor(ConfigErrorService.class); bindInjector(configurator, "simple-connector", SimpleConnector.class, SimpleConnectorInjector.class); bindInjector(configurator, "ejb-container-availability", EjbContainerAvailability.class, EjbContainerAvailabilityInjector.class);
/** * Called by CDI after it has been completely validated. Will add the JIT resolver to HK2 * with the BeanManager * * @param event This is just to mark the type of the event * @param manager The manager that will be used to get references */ @SuppressWarnings("unused") private void afterDeploymentValidation(@Observes AfterDeploymentValidation event) { if (locator == null) return; DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class); DynamicConfiguration config = dcs.createDynamicConfiguration(); config.addActiveDescriptor(CDISecondChanceResolver.class); config.addActiveDescriptor(CDIContextBridge.class); config.commit(); }
private void addDescriptorFileFinder( ServiceLocator serviceLocator, DescriptorFileFinder descriptorFileFinder) { if (descriptorFileFinder != null) { DynamicConfigurationService dcs = serviceLocator .getService(DynamicConfigurationService.class); DynamicConfiguration config = dcs.createDynamicConfiguration(); config.addActiveDescriptor(BuilderHelper .createConstantDescriptor(descriptorFileFinder)); config.commit(); } }
private void addDescriptorFileFinder( ServiceLocator serviceLocator, DescriptorFileFinder descriptorFileFinder) { if (descriptorFileFinder != null) { DynamicConfigurationService dcs = serviceLocator .getService(DynamicConfigurationService.class); DynamicConfiguration config = dcs.createDynamicConfiguration(); config.addActiveDescriptor(BuilderHelper .createConstantDescriptor(descriptorFileFinder)); config.commit(); } }
private static void atomicReplace(ServiceLocator locator, ProgramOptions options) { DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class); DynamicConfiguration config = dcs.createDynamicConfiguration(); config.addUnbindFilter(BuilderHelper.createContractFilter(ProgramOptions.class.getName())); ActiveDescriptor<ProgramOptions> desc = BuilderHelper.createConstantDescriptor( options, null, ProgramOptions.class); config.addActiveDescriptor(desc); config.commit(); }
protected void initializeServiceLocator(ServiceLocator serviceLocator) throws MultiException { DynamicConfigurationService dcs = serviceLocator .getService(DynamicConfigurationService.class); DynamicConfiguration config = dcs.createDynamicConfiguration(); config.bind(BuilderHelper.createConstantDescriptor(Logger.getAnonymousLogger())); // default modules registry is the one that created the habitat config.bind(BuilderHelper.createConstantDescriptor(this)); ContextDuplicatePostProcessor processor = serviceLocator.getService(ContextDuplicatePostProcessor.class); if (processor == null) { config.addActiveDescriptor(ContextDuplicatePostProcessor.class); } config.commit(); }
protected void initializeServiceLocator(ServiceLocator serviceLocator) throws MultiException { DynamicConfigurationService dcs = serviceLocator .getService(DynamicConfigurationService.class); DynamicConfiguration config = dcs.createDynamicConfiguration(); config.bind(BuilderHelper.createConstantDescriptor(Logger.getAnonymousLogger())); // default modules registry is the one that created the habitat config.bind(BuilderHelper.createConstantDescriptor(this)); ContextDuplicatePostProcessor processor = serviceLocator.getService(ContextDuplicatePostProcessor.class); if (processor == null) { config.addActiveDescriptor(ContextDuplicatePostProcessor.class); } config.commit(); }
/** * @see #link(ServiceLocator, Injector) * @see #newChildInjector(Injector, ServiceLocator) */ private static void link(ServiceLocator locator, Injector injector, Iterable<? extends Binder> binders) { DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class); DynamicConfiguration dc = dcs.createDynamicConfiguration(); GuiceJustInTimeResolver resolver = new GuiceJustInTimeResolver(locator, injector); dc.bind(BuilderHelper.createConstantDescriptor(resolver)); dc.addActiveDescriptor(GuiceScopeContext.class); bind(locator, dc, new MessagingBinders.HeaderDelegateProviders()); for (Binder binder : binders) { bind(locator, dc, binder); } dc.commit(); }
/** * @see #link(ServiceLocator, Injector) * @see #newChildInjector(Injector, ServiceLocator) */ private static void link(ServiceLocator locator, Injector injector, Iterable<? extends Binder> binders) { DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class); DynamicConfiguration dc = dcs.createDynamicConfiguration(); GuiceJustInTimeResolver resolver = new GuiceJustInTimeResolver(locator, injector); dc.bind(BuilderHelper.createConstantDescriptor(resolver)); dc.addActiveDescriptor(GuiceScopeContext.class); bind(locator, dc, new MessagingBinders.HeaderDelegateProviders()); for (Binder binder : binders) { bind(locator, dc, binder); } dc.commit(); }
/** * @see #link(ServiceLocator, Injector) * @see #newChildInjector(Injector, ServiceLocator) */ private static ServiceLocator link(ServiceLocator locator, Injector injector, Iterable<? extends Binder> binders) { DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class); DynamicConfiguration dc = dcs.createDynamicConfiguration(); GuiceJustInTimeResolver resolver = new GuiceJustInTimeResolver(locator, injector); dc.bind(BuilderHelper.createConstantDescriptor(resolver)); dc.addActiveDescriptor(GuiceScopeContext.class); bind(locator, dc, new MessagingBinders.HeaderDelegateProviders()); for (Binder binder : binders) { bind(locator, dc, binder); } dc.commit(); return locator; }
/** * @see #link(ServiceLocator, Injector) * @see #newChildInjector(Injector, ServiceLocator) */ private static ServiceLocator link(ServiceLocator locator, Injector injector, Iterable<? extends Binder> binders) { DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class); DynamicConfiguration dc = dcs.createDynamicConfiguration(); GuiceJustInTimeResolver resolver = new GuiceJustInTimeResolver(locator, injector); dc.bind(BuilderHelper.createConstantDescriptor(resolver)); dc.addActiveDescriptor(GuiceScopeContext.class); bind(locator, dc, new MessagingBinders.HeaderDelegateProviders()); for (Binder binder : binders) { bind(locator, dc, binder); } dc.commit(); return locator; }