generateEquals();
    protected void generate() throws NoSuchMethodException, NoSuchFieldException {        if (!keyInterface.isInterface()) {            throw new IllegalArgumentException(keyInterface + " is not an interface");        }        Method[] methods = keyInterface.getDeclaredMethods();        for (int i = 0; i < methods.length; i++) {            if (methods[i].getName().equals("newInstance")) {                if (newInstance != null) {                    throw new IllegalArgumentException("Multiple newInstance methods");                }                newInstance = methods[i];            }        }        if (newInstance == null) {            throw new IllegalArgumentException("Missing newInstance method");        }        if (!newInstance.getReturnType().equals(Object.class)) {            throw new IllegalArgumentException("newInstance method must return Object");        }        parameterTypes = newInstance.getParameterTypes();        numArgs = parameterTypes.length;        declare_interface(keyInterface);        generateNullConstructor();        generateConstructor();        generateFactory();        // generateEquals();    }