Search in sources :

Example 6 with SharedObjectCache

use of org.jboss.weld.resources.SharedObjectCache in project core by weld.

the class SimpleInterceptorTest method testInterceptorModel.

@Test
public void testInterceptorModel() {
    TypeStore typeStore = new TypeStore();
    InterceptorBindingModel<SecondaryInterceptionBinding> interceptorBindingModel = new InterceptorBindingModel<SecondaryInterceptionBinding>(new ClassTransformer(typeStore, new SharedObjectCache(), ReflectionCacheFactory.newInstance(typeStore), RegistrySingletonProvider.STATIC_INSTANCE).getEnhancedAnnotation(SecondaryInterceptionBinding.class));
    Set<Annotation> annotations = interceptorBindingModel.getInheritedInterceptionBindingTypes();
    assert annotations.size() != 0;
}
Also used : SharedObjectCache(org.jboss.weld.resources.SharedObjectCache) TypeStore(org.jboss.weld.metadata.TypeStore) InterceptorBindingModel(org.jboss.weld.metadata.cache.InterceptorBindingModel) ClassTransformer(org.jboss.weld.resources.ClassTransformer) Annotation(java.lang.annotation.Annotation) Test(org.junit.Test)

Example 7 with SharedObjectCache

use of org.jboss.weld.resources.SharedObjectCache in project HotswapAgent by HotswapProjects.

the class BeanReloadExecutor method getClassTransformer.

private static ClassTransformer getClassTransformer() {
    TypeStore store = new TypeStore();
    SharedObjectCache cache = new SharedObjectCache();
    ReflectionCache reflectionCache = ReflectionCacheFactory.newInstance(store);
    ClassTransformer classTransformer = new ClassTransformer(store, cache, reflectionCache, "STATIC_INSTANCE");
    return classTransformer;
}
Also used : ReflectionCache(org.jboss.weld.resources.ReflectionCache) SharedObjectCache(org.jboss.weld.resources.SharedObjectCache) TypeStore(org.jboss.weld.metadata.TypeStore) ClassTransformer(org.jboss.weld.resources.ClassTransformer)

Aggregations

TypeStore (org.jboss.weld.metadata.TypeStore)7 ClassTransformer (org.jboss.weld.resources.ClassTransformer)7 SharedObjectCache (org.jboss.weld.resources.SharedObjectCache)7 Test (org.junit.Test)3 EnhancedAnnotatedMethod (org.jboss.weld.annotated.enhanced.EnhancedAnnotatedMethod)2 ReflectionCache (org.jboss.weld.resources.ReflectionCache)2 Annotation (java.lang.annotation.Annotation)1 SlimAnnotatedTypeStore (org.jboss.weld.annotated.slim.SlimAnnotatedTypeStore)1 SpecializationAndEnablementRegistry (org.jboss.weld.bootstrap.SpecializationAndEnablementRegistry)1 SimpleServiceRegistry (org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry)1 WeldConfiguration (org.jboss.weld.config.WeldConfiguration)1 GlobalObserverNotifierService (org.jboss.weld.event.GlobalObserverNotifierService)1 ResourceInjectionFactory (org.jboss.weld.injection.ResourceInjectionFactory)1 InjectionTargetService (org.jboss.weld.injection.producer.InjectionTargetService)1 InterceptorsApiAbstraction (org.jboss.weld.interceptor.builder.InterceptorsApiAbstraction)1 InterceptorBindingModel (org.jboss.weld.metadata.cache.InterceptorBindingModel)1 MetaAnnotationStore (org.jboss.weld.metadata.cache.MetaAnnotationStore)1 BeanIdentifierIndex (org.jboss.weld.serialization.BeanIdentifierIndex)1 ContextualStoreImpl (org.jboss.weld.serialization.ContextualStoreImpl)1 TestAnnotatedTypeBuilder (org.jboss.weld.test.util.annotated.TestAnnotatedTypeBuilder)1