private void processForAnnotations(AnnotationInfo element, AccessibleObject o,
Map<AccessibleObject, Class[]> methodLevelInterceptors,
ManagedBeanDescriptor managedBeanDesc, Class managedBeanClass)
throws AnnotationProcessorException {
Annotation ann = getMethodAnnotation(o, "javax.interceptor.Interceptors");
if(ann != null) {
try {
Method valueM = ann.annotationType().getDeclaredMethod("value");
methodLevelInterceptors.put(o, (Class[]) valueM.invoke(ann));
} catch(Exception e) {
AnnotationProcessorException ape = new AnnotationProcessorException(e.getMessage(), element);
ape.initCause(e);
throw ape;
}
} else {
boolean excludeClassInterceptors =
( getMethodAnnotation(o, "javax.interceptor.ExcludeClassInterceptors") != null );
if( excludeClassInterceptors ) {
MethodDescriptor mDesc = getMethodDescriptor(o, managedBeanClass);
if (mDesc != null) {
managedBeanDesc.setMethodLevelInterceptorChain(mDesc,
new LinkedList<InterceptorDescriptor>());
}
}
}
}