public static MethodProxy create( Method method, Method superMethod  ) { try { Class declaring = method.getDeclaringClass(); String className = NAME_FACTORY.getNextName(declaring); ClassLoader loader = declaring.getClassLoader(); if (loader == null) { loader = DEFAULT_LOADER; } Class gen = new Generator(className, superMethod, method , loader).define(); return (MethodProxy)gen.getConstructor(Constants.TYPES_EMPTY).newInstance(null); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new CodeGenerationException(e); }
public static MethodProxy create(Method method, Method superMethod) { return create(method, superMethod, null);
    public static MethodProxy create( Method method, Method superMethod  ) {        try {            Class declaring = method.getDeclaringClass();            String className = NAME_FACTORY.getNextName(declaring);            ClassLoader loader = declaring.getClassLoader();            if (loader == null) {                loader = DEFAULT_LOADER;            }            Class gen = new Generator(className, superMethod, method , loader).define();            return (MethodProxy)gen.getConstructor(Constants.TYPES_EMPTY).newInstance(null);        } catch (RuntimeException e) {            throw e;        } catch (Exception e) {            throw new CodeGenerationException(e);        }    }