if (callbacks == null && callbackTypes == null) { throw new IllegalStateException("Either callbacks or callback types are always required");
if ((classOnly || transforming) && callbackTypes == null) { throw new IllegalStateException("Callback types are required");
    private void validate(boolean transforming) {        if (transforming) {            if (filter != null && !(filter instanceof CallbackFilter2)) {                throw new IllegalArgumentException("CallbackFilter2 must be used when transforming");            }        } else 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");            }            Type[] check = CallbackInfo.determineTypes(callbacks);            for (int i = 0; i < check.length; i++) {                if (check[i] != callbackTypes[i]) {                    throw new IllegalStateException("Callback " + check[i] + " is not assignable to " + callbackTypes[i]);                }            }        } else if (callbacks != null) {            callbackTypes = CallbackInfo.determineTypes(callbacks);        }        if (filter == null) {            if (callbackTypes.length > 1) {                throw new IllegalStateException("Multiple callback types possible but no filter specified");            }            filter = CallbackFilter2.ALL_ZERO;        }    }