static Object readObjectFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy) throws IOException { final int number = input.readFieldNumber(schema); final boolean mapped; switch (number) { case ID_ARRAY: mapped = false; break; case ID_ARRAY_MAPPED: mapped = true; break; default: throw new ProtostuffException("Corrupt input."); } final ArrayWrapper mArrayWrapper = ObjectSchema.newArrayWrapper(input, schema, mapped, strategy); if (input instanceof GraphInput) { // update the actual reference. ((GraphInput) input).updateLast(mArrayWrapper.array, owner); } strategy.COLLECTION_SCHEMA.mergeFrom(input, mArrayWrapper); return mArrayWrapper.array; }
static Object readObjectFrom(Input input, Schema<?> schema, Object owner, IdStrategy strategy) throws IOException { final int number = input.readFieldNumber(schema); final boolean mapped; switch (number) { case ID_ARRAY: mapped = false; break; case ID_ARRAY_MAPPED: mapped = true; break; default: throw new ProtostuffException("Corrupt input."); } final ArrayWrapper mArrayWrapper = ObjectSchema.newArrayWrapper(input, schema, mapped, strategy); if (input instanceof GraphInput) { // update the actual reference. ((GraphInput) input).updateLast(mArrayWrapper.array, owner); } strategy.COLLECTION_SCHEMA.mergeFrom(input, mArrayWrapper); return mArrayWrapper.array; }
final ArrayWrapper arrayWrapper = newArrayWrapper(input, schema, false, strategy); final ArrayWrapper mArrayWrapper = newArrayWrapper(input, schema, true, strategy);
final ArrayWrapper arrayWrapper = newArrayWrapper(input, schema, false, strategy); final ArrayWrapper mArrayWrapper = newArrayWrapper(input, schema, true, strategy);