public <T> Interceptor<T> getEjbInterceptorForClass(Class<T> interceptorClass)
{
Interceptor<T> interceptor = (Interceptor<T>) ejbInterceptors.get(interceptorClass);
if (interceptor == null)
{
AnnotatedType<T> annotatedType = webBeansContext.getAnnotatedElementFactory().getAnnotatedType(interceptorClass);
if (annotatedType == null)
{
annotatedType = webBeansContext.getAnnotatedElementFactory().newAnnotatedType(interceptorClass);
}
BeanAttributesImpl<T> beanAttributes = BeanAttributesBuilder.forContext(webBeansContext).newBeanAttibutes(annotatedType).build();
EjbInterceptorBeanBuilder<T> buildr = new EjbInterceptorBeanBuilder<>(webBeansContext, annotatedType, beanAttributes);
buildr.defineEjbInterceptorRules();
Interceptor<T> i = buildr.getBean();
interceptor = (Interceptor<T>) ejbInterceptors.putIfAbsent(interceptorClass, i);
if (interceptor == null)
{
interceptor = i;
}
}
return interceptor;
}