Search in sources :

Example 1 with SlimAnnotatedType

use of org.jboss.weld.annotated.slim.SlimAnnotatedType in project wildfly by wildfly.

the class WeldInterceptorBindingsService method getInterceptorBindings.

private InterceptorBindings getInterceptorBindings(final String ejbName, final BeanManagerImpl manager) {
    InterceptorBindings retVal = null;
    if (ejbName != null) {
        retVal = interceptorSupport.getInterceptorBindings(ejbName, manager);
    } else {
        // This is a managed bean
        SlimAnnotatedType<?> type = (SlimAnnotatedType<?>) manager.createAnnotatedType(componentClass);
        if (!manager.getInterceptorModelRegistry().containsKey(type)) {
            EnhancedAnnotatedType<?> enhancedType = manager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(type);
            InterceptionModelInitializer.of(manager, enhancedType, null).init();
        }
        InterceptionModel model = manager.getInterceptorModelRegistry().get(type);
        if (model != null) {
            retVal = new InterceptorBindingsAdapter(manager.getInterceptorModelRegistry().get(type));
        }
    }
    return retVal != null ? retVal : NullInterceptorBindings.INSTANCE;
}
Also used : InterceptorBindingsAdapter(org.jboss.weld.bean.interceptor.InterceptorBindingsAdapter) InterceptorBindings(org.jboss.weld.ejb.spi.InterceptorBindings) ClassTransformer(org.jboss.weld.resources.ClassTransformer) InterceptionModel(org.jboss.weld.interceptor.spi.model.InterceptionModel) SlimAnnotatedType(org.jboss.weld.annotated.slim.SlimAnnotatedType)

Aggregations

SlimAnnotatedType (org.jboss.weld.annotated.slim.SlimAnnotatedType)1 InterceptorBindingsAdapter (org.jboss.weld.bean.interceptor.InterceptorBindingsAdapter)1 InterceptorBindings (org.jboss.weld.ejb.spi.InterceptorBindings)1 InterceptionModel (org.jboss.weld.interceptor.spi.model.InterceptionModel)1 ClassTransformer (org.jboss.weld.resources.ClassTransformer)1