else if(annotationClass == Interceptors.class)
{
InterceptorBindingsMetaData bindings = beanMetaData.getEjbJarMetaData().getAssemblyDescriptor().getInterceptorBindings();
if(bindings != null)
{
InterceptorsImpl interceptors = new InterceptorsImpl();
for(InterceptorBindingMetaData binding : bindings)
{
// For the bean
if(binding.getMethod() == null)
continue;
NamedMethodMetaData method = binding.getMethod();
// TODO: this is weird, it should have been caught earlier (invalid xml)
if(method.getMethodName() == null)
continue;
if(method.getMethodName().equals(methodName))
{
MethodParametersMetaData methodParams = method.getMethodParams();
if(methodParams == null)
add(interceptors, classLoader, binding);
else
{
if(Arrays.equals(methodParams.toArray(), parameterNames))
add(interceptors, classLoader, binding);
}
}
}
if(interceptors.value().length > 0)
return annotationClass.cast(interceptors);
}
}
else if(annotationClass == PostActivate.class)
{