Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
ClassLoader cl = getVerifierContext().getClassLoader();
if(descriptor.hasAroundInvokeMethod()) {
Set<MethodDescriptor> businessMethods = descriptor.getMethodDescriptors();
Set<LifecycleCallbackDescriptor> aiDescriptors =
descriptor.getAroundInvokeDescriptors();
for (LifecycleCallbackDescriptor aiDesc : aiDescriptors) {
try {
Method interceptorMethod = aiDesc.getLifecycleCallbackMethodObject(cl);
MethodDescriptor interceptorMD = new MethodDescriptor(interceptorMethod);
if(businessMethods.contains(interceptorMD)) {
addErrorDetails(result, compName);
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"AroundInvoke method [ {0} ] is a business method.",
new Object[] {interceptorMethod}));
}
} catch (Exception e) {}// will be caught in other tests
}
}
if(result.getStatus()!=Result.FAILED) {
addGoodDetails(result, compName);
result.passed(smh.getLocalString
(getClass().getName() + ".passed",
"Valid Interceptor methods."));
}
return result;