}
for (InterceptorMetaData interceptor : metaData.getInterceptors()) {
String interceptorClassName = interceptor.getInterceptorClass();
// get (or create the interceptor description)
EEModuleClassDescription interceptorModuleClassDescription = applicationClassesDescription.getOrAddClassByName(interceptorClassName);
// around-invoke(s) of the interceptor configured (if any) in the deployment descriptor
AroundInvokesMetaData aroundInvokes = interceptor.getAroundInvokes();
if (aroundInvokes != null) {
for (AroundInvokeMetaData aroundInvoke : aroundInvokes) {
String methodName = aroundInvoke.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(Object.class, methodName, new Class<?>[]{InvocationContext.class});
interceptorModuleClassDescription.setAroundInvokeMethod(methodIdentifier);
}
}
// post-construct(s) of the interceptor configured (if any) in the deployment descriptor
LifecycleCallbacksMetaData postConstructs = interceptor.getPostConstructs();
if (postConstructs != null) {
for (LifecycleCallbackMetaData postConstruct : postConstructs) {
String methodName = postConstruct.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(Void.TYPE, methodName, new Class<?>[]{InvocationContext.class});
// add it to the interceptor description
interceptorModuleClassDescription.setPostConstructMethod(methodIdentifier);
}
}
// pre-destroy(s) of the interceptor configured (if any) in the deployment descriptor
LifecycleCallbacksMetaData preDestroys = interceptor.getPreDestroys();
if (preDestroys != null) {
for (LifecycleCallbackMetaData preDestroy : preDestroys) {
String methodName = preDestroy.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(Void.TYPE, methodName, new Class<?>[]{InvocationContext.class});
// add it to the interceptor description
interceptorModuleClassDescription.setPreDestroyMethod(methodIdentifier);
}
}
}
}