| Index: mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/mojo/Struct4.java
|
| diff --git a/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/mojo/Struct4.java b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/mojo/Struct4.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d70780a76860c7e5c378358ea99a58fac2217f70
|
| --- /dev/null
|
| +++ b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/mojo/Struct4.java
|
| @@ -0,0 +1,63 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// This file is autogenerated by:
|
| +// mojo/public/tools/bindings/mojom_bindings_generator.py
|
| +// For:
|
| +// mojo/public/interfaces/bindings/tests/serialization_test_structs.mojom
|
| +//
|
| +
|
| +package org.chromium.mojo.bindings.test.mojom.mojo;
|
| +
|
| +public final class Struct4 extends org.chromium.mojo.bindings.Struct {
|
| +
|
| + private static final int STRUCT_SIZE = 16;
|
| + private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 1);
|
| +
|
| + public Struct1[] array;
|
| +
|
| + public Struct4() {
|
| + super(STRUCT_SIZE);
|
| + }
|
| +
|
| + public static Struct4 deserialize(org.chromium.mojo.bindings.Message message) {
|
| + return decode(new org.chromium.mojo.bindings.Decoder(message));
|
| + }
|
| +
|
| + public static Struct4 decode(org.chromium.mojo.bindings.Decoder decoder0) {
|
| + if (decoder0 == null) {
|
| + return null;
|
| + }
|
| + Struct4 result = new Struct4();
|
| + DataHeader mainDataHeader = decoder0.readDataHeader();
|
| + if (mainDataHeader.numFields > 0) {
|
| + org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8);
|
| + if (decoder1 == null) {
|
| + result.array = null;
|
| + } else {
|
| + DataHeader si1 = decoder1.readDataHeader();
|
| + result.array = new Struct1[si1.numFields];
|
| + for (int i1 = 0; i1 < si1.numFields; ++i1) {
|
| + org.chromium.mojo.bindings.Decoder decoder2 = decoder1.readPointer(DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i1);
|
| + result.array[i1] = Struct1.decode(decoder2);
|
| + }
|
| + }
|
| + }
|
| + return result;
|
| + }
|
| +
|
| + @Override
|
| + protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
| + org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
| + if (array == null) {
|
| + encoder0.encodeNullPointer(8);
|
| + } else {
|
| + org.chromium.mojo.bindings.Encoder encoder1 = encoder0.encodePointerArray(array.length, 8);
|
| + for (int i0 = 0; i0 < array.length; ++i0) {
|
| + encoder1.encode(array[i0], DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE * i0);
|
| + }
|
| + }
|
| + }
|
| +}
|
| +
|
|
|