if (mode.equals(ParameterMode.IN)) {
payloadList.add(payloadArray[nextIndex++]);
} else if (mode.equals(ParameterMode.INOUT)) {
// Promote array params from [<T>] to [Holder<T>]
Object item = payloadArray[nextIndex++];
Holder itemHolder = new Holder(item);
payloadList.add(itemHolder);
argumentHolderCount++;
} else {
// Create an empty Holder since we should not pass values for OUT parameters
payloadList.add(new Holder());
argumentHolderCount++;
}
}
// Maybe a bit odd to do but this way I don't have to worry about how the invoke if/else