use of org.jboss.weld.bootstrap.SpecializationAndEnablementRegistry in project core by weld.
the class AccessibleManagerResolutionTest method beforeMethod.
@BeforeMethod
public void beforeMethod() {
BeanIdentifierIndex beanIdentifierIndex = new BeanIdentifierIndex();
beanIdentifierIndex.build(Collections.<Bean<?>>emptySet());
this.typeStore = new TypeStore();
this.classTransformer = new ClassTransformer(typeStore, new SharedObjectCache(), ReflectionCacheFactory.newInstance(typeStore), RegistrySingletonProvider.STATIC_INSTANCE);
this.services = new SimpleServiceRegistry();
this.services.add(MetaAnnotationStore.class, new MetaAnnotationStore(classTransformer));
this.services.add(ContextualStore.class, new ContextualStoreImpl(STATIC_INSTANCE, beanIdentifierIndex));
this.services.add(ClassTransformer.class, classTransformer);
this.services.add(SharedObjectCache.class, new SharedObjectCache());
this.services.add(WeldConfiguration.class, new WeldConfiguration(this.services, new MockDeployment(services)));
this.services.add(SecurityServices.class, NoopSecurityServices.INSTANCE);
this.services.add(ObserverNotifierFactory.class, DefaultObserverNotifierFactory.INSTANCE);
this.services.add(GlobalObserverNotifierService.class, new GlobalObserverNotifierService(services, RegistrySingletonProvider.STATIC_INSTANCE));
this.services.add(ExpressionLanguageSupport.class, WeldWebModule.EL_SUPPORT);
this.services.add(SpecializationAndEnablementRegistry.class, new SpecializationAndEnablementRegistry());
this.services.add(InterceptorsApiAbstraction.class, new InterceptorsApiAbstraction(DefaultResourceLoader.INSTANCE));
this.services.add(ProxyInstantiator.class, DefaultProxyInstantiator.INSTANCE);
this.services.add(ResourceInjectionFactory.class, new ResourceInjectionFactory());
this.services.add(EjbSupport.class, EjbSupport.NOOP_IMPLEMENTATION);
// create BeanManagerImpl and initialize container
root = BeanManagerImpl.newRootManager(STATIC_INSTANCE, "root", services);
Container.initialize(root, services);
// add injection target service; has to be done once container was initialized
this.services.add(InjectionTargetService.class, new InjectionTargetService(root));
}
Aggregations