/** * Invalidate methods on the interface which are not managed. */ private void invalidateNonBeanMethods(BCClass bc, Class<?> iface, Set<Method> methods) { Method[] meths = (Method[]) AccessController.doPrivileged( J2DoPrivHelper.getDeclaredMethodsAction(iface)); BCMethod meth; Code code; Class<?> type = _repos.getMetaDataFactory().getDefaults(). getUnimplementedExceptionType(); for (int i = 0; i < meths.length; i++) { if (methods.contains(meths[i])) continue; meth = bc.declareMethod(meths[i].getName(), meths[i].getReturnType(), meths[i].getParameterTypes()); meth.makePublic(); code = meth.getCode(true); code.anew().setType(type); code.dup(); code.invokespecial().setMethod(type, "<init>", void.class, null); code.athrow(); code.calculateMaxLocals(); code.calculateMaxStack(); } }
/** * Invalidate methods on the interface which are not managed. */ private void invalidateNonBeanMethods(BCClass bc, Class<?> iface, Set<Method> methods) { Method[] meths = (Method[]) AccessController.doPrivileged( J2DoPrivHelper.getDeclaredMethodsAction(iface)); BCMethod meth; Code code; Class<?> type = _repos.getMetaDataFactory().getDefaults(). getUnimplementedExceptionType(); for (int i = 0; i < meths.length; i++) { if (methods.contains(meths[i])) continue; meth = bc.declareMethod(meths[i].getName(), meths[i].getReturnType(), meths[i].getParameterTypes()); meth.makePublic(); code = meth.getCode(true); code.anew().setType(type); code.dup(); code.invokespecial().setMethod(type, "<init>", void.class, null); code.athrow(); code.calculateMaxLocals(); code.calculateMaxStack(); } }
/** * Invalidate methods on the interface which are not managed. */ private void invalidateNonBeanMethods(BCClass bc, Class iface, Set methods) { Method[] meths = (Method[]) AccessController.doPrivileged( J2DoPrivHelper.getDeclaredMethodsAction(iface)); BCMethod meth; Code code; Class type = _repos.getMetaDataFactory().getDefaults(). getUnimplementedExceptionType(); for (int i = 0; i < meths.length; i++) { if (methods.contains(meths[i])) continue; meth = bc.declareMethod(meths[i].getName(), meths[i].getReturnType(), meths[i].getParameterTypes()); meth.makePublic(); code = meth.getCode(true); code.anew().setType(type); code.dup(); code.invokespecial().setMethod(type, "<init>", void.class, null); code.athrow(); code.calculateMaxLocals(); code.calculateMaxStack(); } }
/** * Invalidate methods on the interface which are not managed. */ private void invalidateNonBeanMethods(BCClass bc, Class<?> iface, Set<Method> methods) { Method[] meths = (Method[]) AccessController.doPrivileged( J2DoPrivHelper.getDeclaredMethodsAction(iface)); BCMethod meth; Code code; Class<?> type = _repos.getMetaDataFactory().getDefaults(). getUnimplementedExceptionType(); for (int i = 0; i < meths.length; i++) { if (methods.contains(meths[i])) continue; meth = bc.declareMethod(meths[i].getName(), meths[i].getReturnType(), meths[i].getParameterTypes()); meth.makePublic(); code = meth.getCode(true); code.anew().setType(type); code.dup(); code.invokespecial().setMethod(type, "<init>", void.class, null); code.athrow(); code.calculateMaxLocals(); code.calculateMaxStack(); } }
/** * Invalidate methods on the interface which are not managed. */ private void invalidateNonBeanMethods(BCClass bc, Class<?> iface, Set<Method> methods) { Method[] meths = (Method[]) AccessController.doPrivileged( J2DoPrivHelper.getDeclaredMethodsAction(iface)); BCMethod meth; Code code; Class<?> type = _repos.getMetaDataFactory().getDefaults(). getUnimplementedExceptionType(); for (int i = 0; i < meths.length; i++) { if (methods.contains(meths[i])) continue; meth = bc.declareMethod(meths[i].getName(), meths[i].getReturnType(), meths[i].getParameterTypes()); meth.makePublic(); code = meth.getCode(true); code.anew().setType(type); code.dup(); code.invokespecial().setMethod(type, "<init>", void.class, null); code.athrow(); code.calculateMaxLocals(); code.calculateMaxStack(); } }