org.objectweb.easybeans.deployment.annotations.helper.bean
Class InterceptorsClassResolver

java.lang.Object
  extended by org.objectweb.easybeans.deployment.annotations.helper.bean.InterceptorsClassResolver

public final class InterceptorsClassResolver
extends java.lang.Object

This class sets the EasyBeans interceptors used when invoking business methods and also for life cycle events.

Author:
Florent Benoit

Field Summary
private static JMethod EASYBEANS_INTERCEPTOR
          Signature of EasyBeans interceptors.
 
Constructor Summary
private InterceptorsClassResolver()
          Helper class, no public constructor.
 
Method Summary
private static java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> getInterceptors(java.lang.String referencingName, EjbJarAnnotationMetadata ejbJarAnnotationMetadata, java.util.List<java.lang.String> interceptorsClasses)
          Found interceptors method in the given class.
static void resolve(ClassAnnotationMetadata classAnnotationMetadata)
          Found all interceptors of the class (including business and lifecycle events) and also set EasyBeans interceptors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EASYBEANS_INTERCEPTOR

private static final JMethod EASYBEANS_INTERCEPTOR
Signature of EasyBeans interceptors.

Constructor Detail

InterceptorsClassResolver

private InterceptorsClassResolver()
Helper class, no public constructor.

Method Detail

resolve

public static void resolve(ClassAnnotationMetadata classAnnotationMetadata)
                    throws ResolverException
Found all interceptors of the class (including business and lifecycle events) and also set EasyBeans interceptors.

Parameters:
classAnnotationMetadata - class to analyze
Throws:
ResolverException - if metadata is missing

getInterceptors

private static java.util.Map<InterceptorType,java.util.List<JClassInterceptor>> getInterceptors(java.lang.String referencingName,
                                                                                                EjbJarAnnotationMetadata ejbJarAnnotationMetadata,
                                                                                                java.util.List<java.lang.String> interceptorsClasses)
                                                                                         throws ResolverException
Found interceptors method in the given class. It will analyze each interceptor class and fill a structure with a mapping between the annotation type and the corresponding interceptors.

Parameters:
referencingName - name of the class/method that reference these interceptors
ejbJarAnnotationMetadata - root of all annotations (used to find the metadata)
interceptorsClasses - list of classes that contains interceptors
Returns:
the map between the type of interceptor (PostConstrut, AroundInvoke, ...) and the JClassInterceptor objects
Throws:
ResolverException - if analyze fails