1 25 package org.objectweb.easybeans.tests.common.interceptors.invocationcontext; 26 27 import javax.interceptor.AroundInvoke; 28 import javax.interceptor.InvocationContext; 29 30 31 32 38 public class ICParamInterceptorCheckNull { 39 40 46 @AroundInvoke 47 public Object checkNull(final InvocationContext ic) throws Exception { 48 Object [] arParam = ic.getParameters(); 49 50 if (arParam != null) { 51 for (int i = 0; i < arParam.length; i++) { 52 if (arParam[i] != null){ 53 throw new Exception (ICParamInterceptorCheckNull.class.getName() + " - some values are not null."); 54 } 55 } 56 } 57 return ic.proceed(); 58 } 59 } 60 | Popular Tags |