Object key = KEY_FACTORY.newInstance(superclass, interfaces, filter, callbackTypes, classOnly, useFactory);
Object key = KEY_FACTORY.newInstance(superclass, interfaces, filter, callbackTypes, useFactory);
    private Object createHelper() {        if (classOnly ^ (callbacks == null)) {            if (classOnly) {                throw new IllegalStateException("createClass does not accept callbacks");            } else {                throw new IllegalStateException("callbacks are required unless using createClass");            }        }        if (callbacks == null && callbackTypes == null) {            throw new IllegalStateException("Either callbacks or callback types are always required");        }        if (callbacks != null && callbackTypes != null) {            if (callbacks.length != callbackTypes.length) {                throw new IllegalStateException("Lengths of callback and callback types array must be the same");            }            for (int i = 0; i < callbacks.length; i++) {                // make sure all classes are callbacks                CallbackUtils.getGenerator(callbackTypes[i]);                if (callbacks[i] == null) {                    throw new IllegalStateException("Callback cannot be null");                }                if (!callbackTypes[i].isAssignableFrom(callbacks[i].getClass())) {                    throw new IllegalStateException("Callback " + callbacks[i] + " is not assignable to " + callbackTypes[i]);                }            }        } else if (callbacks != null) {            callbackTypes = new Class[callbacks.length];            for (int i = 0; i < callbacks.length; i++) {                callbackTypes[i] = CallbackUtils.determineType(callbacks[i]);            }        } else {            for (int i = 0; i < callbackTypes.length; i++) {                // make sure all classes are callbacks                CallbackUtils.getGenerator(callbackTypes[i]);            }        }        if (filter == null) {            if (callbackTypes.length > 1) {                throw new IllegalStateException("Multiple callback types possible but no filter specified");            }            filter = CallbackFilter.ALL_ZERO;        }                if (superclass != null) {            setNamePrefix(superclass.getName());        } else if (interfaces != null) {            setNamePrefix(interfaces[ReflectUtils.findPackageProtected(interfaces)].getName());        }        Object key = KEY_FACTORY.newInstance(superclass, interfaces, filter, callbackTypes, classOnly, useFactory);        return super.create(key);    }