throw new IllegalArgumentException(argumentName + " cannot be null.");
}
}
private Object execute(Object instance, Method method, Object... arguments) {
final DeepClonerSPI deepCloner = createDeepCloner(classloader);
final Object objectLoadedWithClassloader = deepCloner.clone(instance);
final Object[] argumentsLoadedByClassLoader = new Object[arguments.length];
for (int i = 0; i < arguments.length; i++) {
final Object argument = arguments[i];
argumentsLoadedByClassLoader[i] = deepCloner.clone(argument);
}
Object result = null;
try {
result = Whitebox.invokeMethod(objectLoadedWithClassloader, method.getName(), argumentsLoadedByClassLoader);