// A new value is being sent to the array public void sendValue(Commands.ValueObject value) { java.lang.reflect.Array.set(array, index++, getInvokableObject(value)); // add it to the array }
// The next entry is an array too! public Commands.ValueSender nestedArray(Commands.ValueObject arrayHeader) { InvokableValueSender sender = new InvokableValueSender(arrayHeader); // Take the newly created array and put it into the current array. java.lang.reflect.Array.set(array, index++, sender.getArray()); return sender; }
public void initialize(Commands.ValueObject arrayHeader) { index = 0; Class arrayType = (Class) server.getObject(arrayHeader.classID); array = java.lang.reflect.Array.newInstance(arrayType, arrayHeader.anInt); }