Index: mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/sample/StructWithHoleV2.java |
diff --git a/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/sample/StructWithHoleV2.java b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/sample/StructWithHoleV2.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..77a9679dc3b7076b7156d51b2ebc2bfa165a38f0 |
--- /dev/null |
+++ b/mojo/not-to-commit/mojo_public_test_interfaces/src/org/chromium/mojo/bindings/test/mojom/sample/StructWithHoleV2.java |
@@ -0,0 +1,59 @@ |
+// 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/sample_service.mojom |
+// |
+ |
+package org.chromium.mojo.bindings.test.mojom.sample; |
+ |
+public final class StructWithHoleV2 extends org.chromium.mojo.bindings.Struct { |
+ |
+ private static final int STRUCT_SIZE = 24; |
+ private static final DataHeader DEFAULT_STRUCT_INFO = new DataHeader(STRUCT_SIZE, 3); |
+ |
+ public int v1; |
+ public long v2; |
+ public int v3; |
+ |
+ public StructWithHoleV2() { |
+ super(STRUCT_SIZE); |
+ v1 = (int) 1L; |
+ v2 = (long) 2L; |
+ v3 = (int) 3L; |
+ } |
+ |
+ public static StructWithHoleV2 deserialize(org.chromium.mojo.bindings.Message message) { |
+ return decode(new org.chromium.mojo.bindings.Decoder(message)); |
+ } |
+ |
+ public static StructWithHoleV2 decode(org.chromium.mojo.bindings.Decoder decoder0) { |
+ if (decoder0 == null) { |
+ return null; |
+ } |
+ StructWithHoleV2 result = new StructWithHoleV2(); |
+ DataHeader mainDataHeader = decoder0.readDataHeader(); |
+ if (mainDataHeader.numFields > 0) { |
+ result.v1 = decoder0.readInt(8); |
+ } |
+ if (mainDataHeader.numFields > 2) { |
+ result.v3 = decoder0.readInt(12); |
+ } |
+ if (mainDataHeader.numFields > 1) { |
+ result.v2 = decoder0.readLong(16); |
+ } |
+ return result; |
+ } |
+ |
+ @Override |
+ protected final void encode(org.chromium.mojo.bindings.Encoder encoder) { |
+ org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO); |
+ encoder0.encode(v1, 8); |
+ encoder0.encode(v3, 12); |
+ encoder0.encode(v2, 16); |
+ } |
+} |
+ |