@Override
public <A extends Annotation> A retrieveAnnotation(Class<A> annotationClass, JBossEnterpriseBeanMetaData beanMetaData, ClassLoader classLoader)
{
if(annotationClass == DefaultInterceptors.class)
{
InterceptorBindingsMetaData bindings = beanMetaData.getEjbJarMetaData().getAssemblyDescriptor().getInterceptorBindings();
if(bindings != null)
{
List<Class<?>> interceptors = new ArrayList<Class<?>>();
for(InterceptorBindingMetaData binding : bindings)
{
String bindingEjbName = binding.getEjbName();
if(bindingEjbName.equals("*"))
{
assert binding.getMethod() == null : "method binding not allowed on default interceptor";
add(interceptors, classLoader, binding);
}
}
if(!interceptors.isEmpty())
return annotationClass.cast(new DefaultInterceptorsImpl(interceptors));
}
}
else if(annotationClass == Interceptors.class)
{
InterceptorBindingsMetaData bindings = beanMetaData.getEjbJarMetaData().getAssemblyDescriptor().getInterceptorBindings();
if(bindings != null)
{
InterceptorsImpl interceptors = new InterceptorsImpl();
for(InterceptorBindingMetaData binding : bindings)
{