Turn on java goldens for mojo
This also changes the behaviour of the mojo java generator. The --java_output_directory will now skip generating the *srcjar file if the flag is provided. It seemed kind of weird that it would produce both the srcjar and the src file if the argument was provided. I could not find any usages of this flag anywhere in the codebase. Change-Id: Ie09e423956be68b709c6202c0f25effbb4c684a2 Bug: 40841428 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6547999 Reviewed-by: Alex Gough <ajgo@chromium.org> Commit-Queue: Fred Shih <ffred@chromium.org> Cr-Commit-Position: refs/heads/main@{#1464410}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
9ce1d90740
commit
801ccaa41f
mojo
golden
generate.py
generated
c++
java
org
chromium
golden
BasicStruct.java.goldenIFace.java.goldenIFaceWithTypemap.java.goldenIFaceWithTypemap_Internal.java.goldenIFace_Internal.java.goldenOptionalPrimitives.java.goldenResultInterface.java.goldenResultInterfaceMethodResponseParamResult.java.goldenResultInterfaceSyncMethodResponseParamResult.java.goldenResultInterface_Internal.java.goldenResultTestError.java.goldenTypemapped.java.golden
public
tools
bindings
generators
@ -17,7 +17,6 @@ _PARSER_SCRIPT = os.path.join(_SCRIPT_DIR,
|
||||
_GENERATOR_SCRIPT = os.path.join(
|
||||
_SCRIPT_DIR, '../public/tools/bindings/mojom_bindings_generator.py')
|
||||
|
||||
|
||||
def removesuffix(string, suffix):
|
||||
if not suffix or not string.endswith(suffix):
|
||||
return string
|
||||
@ -49,10 +48,16 @@ def generate_bindings(input_dir, output_dir):
|
||||
],
|
||||
check=True)
|
||||
|
||||
for lang in ['typescript', 'c++']:
|
||||
for lang in ['typescript', 'c++', 'java']:
|
||||
language_flags = []
|
||||
|
||||
lang_tmp_output = f'{tmp_bindings_dir}/{lang}'
|
||||
lang_output = f'{output_dir}/{lang}'
|
||||
|
||||
if lang == 'java':
|
||||
language_flags += ['--java_output_directory=' + lang_tmp_output]
|
||||
|
||||
|
||||
# Paths to module files relative to the bindings output directory.
|
||||
mojom_modules = (os.path.join('../../modules',
|
||||
removesuffix(module_filename, '-module'))
|
||||
@ -62,12 +67,13 @@ def generate_bindings(input_dir, output_dir):
|
||||
'--bytecode_path', tmp_bytecode_dir, '--generators', lang,
|
||||
# typemap is hardcoded for now.
|
||||
'--typemap', f'{input_dir}/typemap.json',
|
||||
*mojom_modules
|
||||
],
|
||||
*language_flags, *mojom_modules],
|
||||
check=True)
|
||||
# Append '.golden' file extension to avoid presubmit checks.
|
||||
for entry in os.scandir(lang_tmp_output):
|
||||
os.rename(entry.path, entry.path + '.golden')
|
||||
for root, dirs, files in os.walk(lang_tmp_output):
|
||||
for file in files:
|
||||
path = root + '/'.join(dirs) + '/' + file
|
||||
os.rename(path, path + '.golden')
|
||||
shutil.copytree(lang_tmp_output, lang_output, dirs_exist_ok=True)
|
||||
|
||||
|
||||
|
@ -734,15 +734,18 @@ void ResultInterface_SyncMethod_ProxyToResponder::Run(
|
||||
mojo::internal::MessageFragment<decltype(params->result)>
|
||||
result_fragment(params.message());
|
||||
result_fragment.Claim(¶ms->result);
|
||||
|
||||
mojo::internal::Serialize<::golden::ResultInterface_SyncMethod_ResponseParam_ResultDataView>(
|
||||
in_result,
|
||||
result_fragment,
|
||||
true);
|
||||
in_result,
|
||||
result_fragment,
|
||||
true);
|
||||
|
||||
MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING(
|
||||
params->result.is_null(),
|
||||
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
|
||||
"null result in ");
|
||||
|
||||
MOJO_INTERNAL_CHECK_SERIALIZATION(
|
||||
mojo::internal::SendValidation::kDefault,
|
||||
!(params->result.is_null()),
|
||||
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
|
||||
"null result in ");
|
||||
|
||||
#if defined(ENABLE_IPC_FUZZER)
|
||||
message.set_interface_name(ResultInterface::Name_);
|
||||
|
@ -0,0 +1,81 @@
|
||||
// BasicStruct.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// basic_struct.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
@NullMarked
|
||||
@SuppressWarnings("NullAway")
|
||||
public final class BasicStruct extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 16;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(16, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public boolean myBool;
|
||||
|
||||
private BasicStruct(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public BasicStruct() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static BasicStruct deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static BasicStruct deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static BasicStruct decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
BasicStruct result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new BasicStruct(elementsOrVersion);
|
||||
{
|
||||
|
||||
result.myBool = decoder0.readBoolean(8, 0);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.myBool, 8, 0);
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// IFace.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// interface.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
public interface IFace extends org.chromium.mojo.bindings.Interface {
|
||||
|
||||
|
||||
|
||||
public interface Proxy extends IFace, org.chromium.mojo.bindings.Interface.Proxy {
|
||||
}
|
||||
|
||||
Manager<IFace, IFace.Proxy> MANAGER = IFace_Internal.MANAGER;
|
||||
|
||||
void method(
|
||||
boolean param,
|
||||
Method_Response callback);
|
||||
|
||||
interface Method_Response {
|
||||
public void call(
|
||||
String result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// IFaceWithTypemap.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// typemap.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
public interface IFaceWithTypemap extends org.chromium.mojo.bindings.Interface {
|
||||
|
||||
|
||||
|
||||
public interface Proxy extends IFaceWithTypemap, org.chromium.mojo.bindings.Interface.Proxy {
|
||||
}
|
||||
|
||||
Manager<IFaceWithTypemap, IFaceWithTypemap.Proxy> MANAGER = IFaceWithTypemap_Internal.MANAGER;
|
||||
|
||||
void echo(
|
||||
Typemapped param,
|
||||
Echo_Response callback);
|
||||
|
||||
interface Echo_Response {
|
||||
public void call(
|
||||
Typemapped out);
|
||||
}
|
||||
|
||||
|
||||
}
|
361
mojo/golden/generated/java/org/chromium/golden/IFaceWithTypemap_Internal.java.golden
Normal file
361
mojo/golden/generated/java/org/chromium/golden/IFaceWithTypemap_Internal.java.golden
Normal file
@ -0,0 +1,361 @@
|
||||
// IFaceWithTypemap_Internal.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// typemap.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
class IFaceWithTypemap_Internal {
|
||||
|
||||
public static final org.chromium.mojo.bindings.Interface.Manager<IFaceWithTypemap, IFaceWithTypemap.Proxy> MANAGER =
|
||||
new org.chromium.mojo.bindings.Interface.Manager<IFaceWithTypemap, IFaceWithTypemap.Proxy>() {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "golden.IFaceWithTypemap";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Proxy buildProxy(org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
|
||||
return new Proxy(core, messageReceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stub buildStub(org.chromium.mojo.system.Core core, IFaceWithTypemap impl) {
|
||||
return new Stub(core, impl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFaceWithTypemap[] buildArray(int size) {
|
||||
return new IFaceWithTypemap[size];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private static final int ECHO_ORDINAL = 0;
|
||||
|
||||
|
||||
static final class Proxy extends org.chromium.mojo.bindings.Interface.AbstractProxy implements IFaceWithTypemap.Proxy {
|
||||
|
||||
Proxy(org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
|
||||
super(core, messageReceiver);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void echo(
|
||||
Typemapped param,
|
||||
Echo_Response callback) {
|
||||
|
||||
IFaceWithTypemapEchoParams _message = new IFaceWithTypemapEchoParams();
|
||||
|
||||
_message.param = param;
|
||||
|
||||
|
||||
getProxyHandler().getMessageReceiver().acceptWithResponder(
|
||||
_message.serializeWithHeader(
|
||||
getProxyHandler().getCore(),
|
||||
new org.chromium.mojo.bindings.MessageHeader(
|
||||
ECHO_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG,
|
||||
0)),
|
||||
new IFaceWithTypemapEchoResponseParamsForwardToCallback(callback));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static final class Stub extends org.chromium.mojo.bindings.Interface.Stub<IFaceWithTypemap> {
|
||||
|
||||
Stub(org.chromium.mojo.system.Core core, IFaceWithTypemap impl) {
|
||||
super(core, impl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(org.chromium.mojo.bindings.Message message) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
int flags = org.chromium.mojo.bindings.MessageHeader.NO_FLAG;
|
||||
if (header.hasFlag(org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG)) {
|
||||
flags = flags | org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG;
|
||||
}
|
||||
if (!header.validateHeader(flags)) {
|
||||
return false;
|
||||
}
|
||||
switch(header.getType()) {
|
||||
|
||||
case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessagesConstants.RUN_OR_CLOSE_PIPE_MESSAGE_ID:
|
||||
return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRunOrClosePipe(
|
||||
IFaceWithTypemap_Internal.MANAGER, messageWithHeader);
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
System.err.println(e.toString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptWithResponder(org.chromium.mojo.bindings.Message message, org.chromium.mojo.bindings.MessageReceiver receiver) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
int flags = org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG;
|
||||
if (header.hasFlag(org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG)) {
|
||||
flags = flags | org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG;
|
||||
}
|
||||
if (!header.validateHeader(flags)) {
|
||||
return false;
|
||||
}
|
||||
switch(header.getType()) {
|
||||
|
||||
case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessagesConstants.RUN_MESSAGE_ID:
|
||||
return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRun(
|
||||
getCore(), IFaceWithTypemap_Internal.MANAGER, messageWithHeader, receiver);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case ECHO_ORDINAL: {
|
||||
|
||||
IFaceWithTypemapEchoParams data =
|
||||
IFaceWithTypemapEchoParams.deserialize(messageWithHeader.getPayload());
|
||||
|
||||
getImpl().echo(data.param, new IFaceWithTypemapEchoResponseParamsProxyToResponder(getCore(), receiver, header.getRequestId()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
System.err.println(e.toString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static final class IFaceWithTypemapEchoParams extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 16;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(16, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public Typemapped param;
|
||||
|
||||
private IFaceWithTypemapEchoParams(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public IFaceWithTypemapEchoParams() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static IFaceWithTypemapEchoParams deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static IFaceWithTypemapEchoParams deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static IFaceWithTypemapEchoParams decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
IFaceWithTypemapEchoParams result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new IFaceWithTypemapEchoParams(elementsOrVersion);
|
||||
{
|
||||
|
||||
org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8, false);
|
||||
result.param = Typemapped.decode(decoder1);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.param, 8, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static final class IFaceWithTypemapEchoResponseParams extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 16;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(16, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public Typemapped out;
|
||||
|
||||
private IFaceWithTypemapEchoResponseParams(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public IFaceWithTypemapEchoResponseParams() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static IFaceWithTypemapEchoResponseParams deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static IFaceWithTypemapEchoResponseParams deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static IFaceWithTypemapEchoResponseParams decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
IFaceWithTypemapEchoResponseParams result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new IFaceWithTypemapEchoResponseParams(elementsOrVersion);
|
||||
{
|
||||
|
||||
org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(8, false);
|
||||
result.out = Typemapped.decode(decoder1);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.out, 8, false);
|
||||
}
|
||||
}
|
||||
|
||||
static class IFaceWithTypemapEchoResponseParamsForwardToCallback extends org.chromium.mojo.bindings.SideEffectFreeCloseable
|
||||
implements org.chromium.mojo.bindings.MessageReceiver {
|
||||
private final IFaceWithTypemap.Echo_Response mCallback;
|
||||
|
||||
IFaceWithTypemapEchoResponseParamsForwardToCallback(IFaceWithTypemap.Echo_Response callback) {
|
||||
this.mCallback = callback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(org.chromium.mojo.bindings.Message message) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
if (!header.validateHeader(ECHO_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
IFaceWithTypemapEchoResponseParams response = IFaceWithTypemapEchoResponseParams.deserialize(messageWithHeader.getPayload());
|
||||
|
||||
mCallback.call(response.out);
|
||||
return true;
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class IFaceWithTypemapEchoResponseParamsProxyToResponder implements IFaceWithTypemap.Echo_Response {
|
||||
|
||||
private final org.chromium.mojo.system.Core mCore;
|
||||
private final org.chromium.mojo.bindings.MessageReceiver mMessageReceiver;
|
||||
private final long mRequestId;
|
||||
|
||||
IFaceWithTypemapEchoResponseParamsProxyToResponder(
|
||||
org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiver messageReceiver,
|
||||
long requestId) {
|
||||
mCore = core;
|
||||
mMessageReceiver = messageReceiver;
|
||||
mRequestId = requestId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void call(Typemapped out) {
|
||||
IFaceWithTypemapEchoResponseParams _response = new IFaceWithTypemapEchoResponseParams();
|
||||
|
||||
_response.out = out;
|
||||
|
||||
org.chromium.mojo.bindings.ServiceMessage _message =
|
||||
_response.serializeWithHeader(
|
||||
mCore,
|
||||
new org.chromium.mojo.bindings.MessageHeader(
|
||||
ECHO_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG,
|
||||
mRequestId));
|
||||
mMessageReceiver.accept(_message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,359 @@
|
||||
// IFace_Internal.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// interface.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
class IFace_Internal {
|
||||
|
||||
public static final org.chromium.mojo.bindings.Interface.Manager<IFace, IFace.Proxy> MANAGER =
|
||||
new org.chromium.mojo.bindings.Interface.Manager<IFace, IFace.Proxy>() {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "golden.IFace";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Proxy buildProxy(org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
|
||||
return new Proxy(core, messageReceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stub buildStub(org.chromium.mojo.system.Core core, IFace impl) {
|
||||
return new Stub(core, impl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFace[] buildArray(int size) {
|
||||
return new IFace[size];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private static final int METHOD_ORDINAL = 0;
|
||||
|
||||
|
||||
static final class Proxy extends org.chromium.mojo.bindings.Interface.AbstractProxy implements IFace.Proxy {
|
||||
|
||||
Proxy(org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
|
||||
super(core, messageReceiver);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void method(
|
||||
boolean param,
|
||||
Method_Response callback) {
|
||||
|
||||
IFaceMethodParams _message = new IFaceMethodParams();
|
||||
|
||||
_message.param = param;
|
||||
|
||||
|
||||
getProxyHandler().getMessageReceiver().acceptWithResponder(
|
||||
_message.serializeWithHeader(
|
||||
getProxyHandler().getCore(),
|
||||
new org.chromium.mojo.bindings.MessageHeader(
|
||||
METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG,
|
||||
0)),
|
||||
new IFaceMethodResponseParamsForwardToCallback(callback));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static final class Stub extends org.chromium.mojo.bindings.Interface.Stub<IFace> {
|
||||
|
||||
Stub(org.chromium.mojo.system.Core core, IFace impl) {
|
||||
super(core, impl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(org.chromium.mojo.bindings.Message message) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
int flags = org.chromium.mojo.bindings.MessageHeader.NO_FLAG;
|
||||
if (header.hasFlag(org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG)) {
|
||||
flags = flags | org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG;
|
||||
}
|
||||
if (!header.validateHeader(flags)) {
|
||||
return false;
|
||||
}
|
||||
switch(header.getType()) {
|
||||
|
||||
case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessagesConstants.RUN_OR_CLOSE_PIPE_MESSAGE_ID:
|
||||
return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRunOrClosePipe(
|
||||
IFace_Internal.MANAGER, messageWithHeader);
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
System.err.println(e.toString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptWithResponder(org.chromium.mojo.bindings.Message message, org.chromium.mojo.bindings.MessageReceiver receiver) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
int flags = org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG;
|
||||
if (header.hasFlag(org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG)) {
|
||||
flags = flags | org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG;
|
||||
}
|
||||
if (!header.validateHeader(flags)) {
|
||||
return false;
|
||||
}
|
||||
switch(header.getType()) {
|
||||
|
||||
case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessagesConstants.RUN_MESSAGE_ID:
|
||||
return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRun(
|
||||
getCore(), IFace_Internal.MANAGER, messageWithHeader, receiver);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case METHOD_ORDINAL: {
|
||||
|
||||
IFaceMethodParams data =
|
||||
IFaceMethodParams.deserialize(messageWithHeader.getPayload());
|
||||
|
||||
getImpl().method(data.param, new IFaceMethodResponseParamsProxyToResponder(getCore(), receiver, header.getRequestId()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
System.err.println(e.toString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static final class IFaceMethodParams extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 16;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(16, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public boolean param;
|
||||
|
||||
private IFaceMethodParams(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public IFaceMethodParams() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static IFaceMethodParams deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static IFaceMethodParams deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static IFaceMethodParams decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
IFaceMethodParams result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new IFaceMethodParams(elementsOrVersion);
|
||||
{
|
||||
|
||||
result.param = decoder0.readBoolean(8, 0);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.param, 8, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static final class IFaceMethodResponseParams extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 16;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(16, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public String result;
|
||||
|
||||
private IFaceMethodResponseParams(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public IFaceMethodResponseParams() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static IFaceMethodResponseParams deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static IFaceMethodResponseParams deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static IFaceMethodResponseParams decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
IFaceMethodResponseParams result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new IFaceMethodResponseParams(elementsOrVersion);
|
||||
{
|
||||
|
||||
result.result = decoder0.readString(8, false);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.result, 8, false);
|
||||
}
|
||||
}
|
||||
|
||||
static class IFaceMethodResponseParamsForwardToCallback extends org.chromium.mojo.bindings.SideEffectFreeCloseable
|
||||
implements org.chromium.mojo.bindings.MessageReceiver {
|
||||
private final IFace.Method_Response mCallback;
|
||||
|
||||
IFaceMethodResponseParamsForwardToCallback(IFace.Method_Response callback) {
|
||||
this.mCallback = callback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(org.chromium.mojo.bindings.Message message) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
if (!header.validateHeader(METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
IFaceMethodResponseParams response = IFaceMethodResponseParams.deserialize(messageWithHeader.getPayload());
|
||||
|
||||
mCallback.call(response.result);
|
||||
return true;
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class IFaceMethodResponseParamsProxyToResponder implements IFace.Method_Response {
|
||||
|
||||
private final org.chromium.mojo.system.Core mCore;
|
||||
private final org.chromium.mojo.bindings.MessageReceiver mMessageReceiver;
|
||||
private final long mRequestId;
|
||||
|
||||
IFaceMethodResponseParamsProxyToResponder(
|
||||
org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiver messageReceiver,
|
||||
long requestId) {
|
||||
mCore = core;
|
||||
mMessageReceiver = messageReceiver;
|
||||
mRequestId = requestId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void call(String result) {
|
||||
IFaceMethodResponseParams _response = new IFaceMethodResponseParams();
|
||||
|
||||
_response.result = result;
|
||||
|
||||
org.chromium.mojo.bindings.ServiceMessage _message =
|
||||
_response.serializeWithHeader(
|
||||
mCore,
|
||||
new org.chromium.mojo.bindings.MessageHeader(
|
||||
METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG,
|
||||
mRequestId));
|
||||
mMessageReceiver.accept(_message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
// OptionalPrimitives.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// optional_primitives.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
@NullMarked
|
||||
@SuppressWarnings("NullAway")
|
||||
public final class OptionalPrimitives extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 40;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(40, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public @Nullable Integer int;
|
||||
public @Nullable Integer[] uints;
|
||||
public @Nullable Boolean[] boolarray;
|
||||
public java.util.Map<Boolean, @Nullable Boolean> bitmap;
|
||||
|
||||
private OptionalPrimitives(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public OptionalPrimitives() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static OptionalPrimitives deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static OptionalPrimitives deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static OptionalPrimitives decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
OptionalPrimitives result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new OptionalPrimitives(elementsOrVersion);
|
||||
{
|
||||
|
||||
if (decoder0.readBoolean(8, 0)) {
|
||||
result.int = new Integer(decoder0.readInt(12));
|
||||
} else {
|
||||
result.int = null;
|
||||
}
|
||||
}
|
||||
{
|
||||
|
||||
result.uints = decoder0.readIntNullables(16, org.chromium.mojo.bindings.BindingsHelper.ELEMENT_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
}
|
||||
{
|
||||
|
||||
result.boolarray = decoder0.readBooleanNullables(24, org.chromium.mojo.bindings.BindingsHelper.ELEMENT_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
}
|
||||
{
|
||||
|
||||
org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(32, false);
|
||||
{
|
||||
decoder1.readDataHeaderForMap();
|
||||
boolean[] keys0;
|
||||
Boolean[] values0;
|
||||
{
|
||||
|
||||
keys0 = decoder1.readBooleans(org.chromium.mojo.bindings.DataHeader.HEADER_SIZE, org.chromium.mojo.bindings.BindingsHelper.NOTHING_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
}
|
||||
{
|
||||
|
||||
values0 = decoder1.readBooleanNullables(org.chromium.mojo.bindings.DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE, org.chromium.mojo.bindings.BindingsHelper.ELEMENT_NULLABLE, keys0.length);
|
||||
}
|
||||
result.bitmap = new java.util.HashMap<Boolean, Boolean>();
|
||||
for (int index0 = 0; index0 < keys0.length; ++index0) {
|
||||
result.bitmap.put(keys0[index0], values0[index0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
final boolean int$flag = this.int != null;
|
||||
final int int$value = int$flag
|
||||
? this.int
|
||||
: 0;
|
||||
|
||||
encoder0.encode(int$flag, 8, 0);
|
||||
|
||||
encoder0.encode(int$value, 12);
|
||||
|
||||
encoder0.encode(this.uints, 16, org.chromium.mojo.bindings.BindingsHelper.ELEMENT_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
|
||||
encoder0.encode(this.boolarray, 24, org.chromium.mojo.bindings.BindingsHelper.ELEMENT_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
|
||||
if (this.bitmap == null) {
|
||||
encoder0.encodeNullPointer(32, false);
|
||||
} else {
|
||||
org.chromium.mojo.bindings.Encoder encoder1 = encoder0.encoderForMap(32);
|
||||
int size0 = this.bitmap.size();
|
||||
boolean[] keys0 = new boolean[size0];
|
||||
Boolean[] values0 = new Boolean[size0];
|
||||
int index0 = 0;
|
||||
for (java.util.Map.Entry<Boolean, Boolean> entry0 : this.bitmap.entrySet()) {
|
||||
keys0[index0] = entry0.getKey();
|
||||
values0[index0] = entry0.getValue();
|
||||
++index0;
|
||||
}
|
||||
|
||||
encoder1.encode(keys0, org.chromium.mojo.bindings.DataHeader.HEADER_SIZE, org.chromium.mojo.bindings.BindingsHelper.NOTHING_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
|
||||
encoder1.encode(values0, org.chromium.mojo.bindings.DataHeader.HEADER_SIZE + org.chromium.mojo.bindings.BindingsHelper.POINTER_SIZE, org.chromium.mojo.bindings.BindingsHelper.ELEMENT_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
// ResultInterface.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// results.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
public interface ResultInterface extends org.chromium.mojo.bindings.Interface {
|
||||
|
||||
|
||||
|
||||
public interface Proxy extends ResultInterface, org.chromium.mojo.bindings.Interface.Proxy {
|
||||
}
|
||||
|
||||
Manager<ResultInterface, ResultInterface.Proxy> MANAGER = ResultInterface_Internal.MANAGER;
|
||||
|
||||
void method(
|
||||
boolean a,
|
||||
Method_Response callback);
|
||||
|
||||
interface Method_Response {
|
||||
public void call(
|
||||
ResultInterfaceMethodResponseParamResult result);
|
||||
}
|
||||
|
||||
|
||||
void syncMethod(
|
||||
boolean a,
|
||||
SyncMethod_Response callback);
|
||||
|
||||
interface SyncMethod_Response {
|
||||
public void call(
|
||||
ResultInterfaceSyncMethodResponseParamResult result);
|
||||
}
|
||||
|
||||
|
||||
}
|
104
mojo/golden/generated/java/org/chromium/golden/ResultInterfaceMethodResponseParamResult.java.golden
Normal file
104
mojo/golden/generated/java/org/chromium/golden/ResultInterfaceMethodResponseParamResult.java.golden
Normal file
@ -0,0 +1,104 @@
|
||||
// ResultInterfaceMethodResponseParamResult.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// results.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
@NullMarked
|
||||
@SuppressWarnings("NullAway")
|
||||
public final class ResultInterfaceMethodResponseParamResult extends org.chromium.mojo.bindings.Union {
|
||||
|
||||
public static final class Tag {
|
||||
public static final int Success = 0;
|
||||
public static final int Failure = 1;
|
||||
};
|
||||
private boolean mSuccess;
|
||||
private ResultTestError mFailure;
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.mTag = Tag.Success;
|
||||
this.mSuccess = success;
|
||||
}
|
||||
|
||||
public boolean getSuccess() {
|
||||
assert this.mTag == Tag.Success;
|
||||
return this.mSuccess;
|
||||
}
|
||||
|
||||
public void setFailure(ResultTestError failure) {
|
||||
this.mTag = Tag.Failure;
|
||||
this.mFailure = failure;
|
||||
}
|
||||
|
||||
public ResultTestError getFailure() {
|
||||
assert this.mTag == Tag.Failure;
|
||||
return this.mFailure;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder0, int offset) {
|
||||
encoder0.encode(org.chromium.mojo.bindings.BindingsHelper.UNION_SIZE, offset);
|
||||
encoder0.encode(this.mTag, offset + 4);
|
||||
switch (mTag) {
|
||||
case Tag.Success: {
|
||||
|
||||
encoder0.encode(this.mSuccess, offset + 8, 0);
|
||||
break;
|
||||
}
|
||||
case Tag.Failure: {
|
||||
|
||||
encoder0.encode(this.mFailure, offset + 8, false);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ResultInterfaceMethodResponseParamResult deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message).decoderForSerializedUnion(), 0);
|
||||
}
|
||||
|
||||
public static final ResultInterfaceMethodResponseParamResult decode(org.chromium.mojo.bindings.Decoder decoder0, int offset) {
|
||||
org.chromium.mojo.bindings.DataHeader dataHeader = decoder0.readDataHeaderForUnion(offset);
|
||||
if (dataHeader.size == 0) {
|
||||
return null;
|
||||
}
|
||||
ResultInterfaceMethodResponseParamResult result = new ResultInterfaceMethodResponseParamResult();
|
||||
switch (dataHeader.elementsOrVersion) {
|
||||
case Tag.Success: {
|
||||
|
||||
result.mSuccess = decoder0.readBoolean(offset + org.chromium.mojo.bindings.DataHeader.HEADER_SIZE, 0);
|
||||
result.mTag = Tag.Success;
|
||||
break;
|
||||
}
|
||||
case Tag.Failure: {
|
||||
|
||||
org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(offset + org.chromium.mojo.bindings.DataHeader.HEADER_SIZE, false);
|
||||
result.mFailure = ResultTestError.decode(decoder1);
|
||||
result.mTag = Tag.Failure;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
104
mojo/golden/generated/java/org/chromium/golden/ResultInterfaceSyncMethodResponseParamResult.java.golden
Normal file
104
mojo/golden/generated/java/org/chromium/golden/ResultInterfaceSyncMethodResponseParamResult.java.golden
Normal file
@ -0,0 +1,104 @@
|
||||
// ResultInterfaceSyncMethodResponseParamResult.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// results.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
@NullMarked
|
||||
@SuppressWarnings("NullAway")
|
||||
public final class ResultInterfaceSyncMethodResponseParamResult extends org.chromium.mojo.bindings.Union {
|
||||
|
||||
public static final class Tag {
|
||||
public static final int Success = 0;
|
||||
public static final int Failure = 1;
|
||||
};
|
||||
private boolean mSuccess;
|
||||
private ResultTestError mFailure;
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.mTag = Tag.Success;
|
||||
this.mSuccess = success;
|
||||
}
|
||||
|
||||
public boolean getSuccess() {
|
||||
assert this.mTag == Tag.Success;
|
||||
return this.mSuccess;
|
||||
}
|
||||
|
||||
public void setFailure(ResultTestError failure) {
|
||||
this.mTag = Tag.Failure;
|
||||
this.mFailure = failure;
|
||||
}
|
||||
|
||||
public ResultTestError getFailure() {
|
||||
assert this.mTag == Tag.Failure;
|
||||
return this.mFailure;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder0, int offset) {
|
||||
encoder0.encode(org.chromium.mojo.bindings.BindingsHelper.UNION_SIZE, offset);
|
||||
encoder0.encode(this.mTag, offset + 4);
|
||||
switch (mTag) {
|
||||
case Tag.Success: {
|
||||
|
||||
encoder0.encode(this.mSuccess, offset + 8, 0);
|
||||
break;
|
||||
}
|
||||
case Tag.Failure: {
|
||||
|
||||
encoder0.encode(this.mFailure, offset + 8, false);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ResultInterfaceSyncMethodResponseParamResult deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message).decoderForSerializedUnion(), 0);
|
||||
}
|
||||
|
||||
public static final ResultInterfaceSyncMethodResponseParamResult decode(org.chromium.mojo.bindings.Decoder decoder0, int offset) {
|
||||
org.chromium.mojo.bindings.DataHeader dataHeader = decoder0.readDataHeaderForUnion(offset);
|
||||
if (dataHeader.size == 0) {
|
||||
return null;
|
||||
}
|
||||
ResultInterfaceSyncMethodResponseParamResult result = new ResultInterfaceSyncMethodResponseParamResult();
|
||||
switch (dataHeader.elementsOrVersion) {
|
||||
case Tag.Success: {
|
||||
|
||||
result.mSuccess = decoder0.readBoolean(offset + org.chromium.mojo.bindings.DataHeader.HEADER_SIZE, 0);
|
||||
result.mTag = Tag.Success;
|
||||
break;
|
||||
}
|
||||
case Tag.Failure: {
|
||||
|
||||
org.chromium.mojo.bindings.Decoder decoder1 = decoder0.readPointer(offset + org.chromium.mojo.bindings.DataHeader.HEADER_SIZE, false);
|
||||
result.mFailure = ResultTestError.decode(decoder1);
|
||||
result.mTag = Tag.Failure;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,587 @@
|
||||
// ResultInterface_Internal.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// results.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
class ResultInterface_Internal {
|
||||
|
||||
public static final org.chromium.mojo.bindings.Interface.Manager<ResultInterface, ResultInterface.Proxy> MANAGER =
|
||||
new org.chromium.mojo.bindings.Interface.Manager<ResultInterface, ResultInterface.Proxy>() {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "golden.ResultInterface";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Proxy buildProxy(org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
|
||||
return new Proxy(core, messageReceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stub buildStub(org.chromium.mojo.system.Core core, ResultInterface impl) {
|
||||
return new Stub(core, impl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultInterface[] buildArray(int size) {
|
||||
return new ResultInterface[size];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private static final int METHOD_ORDINAL = 0;
|
||||
|
||||
private static final int SYNC_METHOD_ORDINAL = 1;
|
||||
|
||||
|
||||
static final class Proxy extends org.chromium.mojo.bindings.Interface.AbstractProxy implements ResultInterface.Proxy {
|
||||
|
||||
Proxy(org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiverWithResponder messageReceiver) {
|
||||
super(core, messageReceiver);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void method(
|
||||
boolean a,
|
||||
Method_Response callback) {
|
||||
|
||||
ResultInterfaceMethodParams _message = new ResultInterfaceMethodParams();
|
||||
|
||||
_message.a = a;
|
||||
|
||||
|
||||
getProxyHandler().getMessageReceiver().acceptWithResponder(
|
||||
_message.serializeWithHeader(
|
||||
getProxyHandler().getCore(),
|
||||
new org.chromium.mojo.bindings.MessageHeader(
|
||||
METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG,
|
||||
0)),
|
||||
new ResultInterfaceMethodResponseParamsForwardToCallback(callback));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void syncMethod(
|
||||
boolean a,
|
||||
SyncMethod_Response callback) {
|
||||
|
||||
ResultInterfaceSyncMethodParams _message = new ResultInterfaceSyncMethodParams();
|
||||
|
||||
_message.a = a;
|
||||
|
||||
|
||||
getProxyHandler().getMessageReceiver().acceptWithResponder(
|
||||
_message.serializeWithHeader(
|
||||
getProxyHandler().getCore(),
|
||||
new org.chromium.mojo.bindings.MessageHeader(
|
||||
SYNC_METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG,
|
||||
0)),
|
||||
new ResultInterfaceSyncMethodResponseParamsForwardToCallback(callback));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static final class Stub extends org.chromium.mojo.bindings.Interface.Stub<ResultInterface> {
|
||||
|
||||
Stub(org.chromium.mojo.system.Core core, ResultInterface impl) {
|
||||
super(core, impl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(org.chromium.mojo.bindings.Message message) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
int flags = org.chromium.mojo.bindings.MessageHeader.NO_FLAG;
|
||||
if (header.hasFlag(org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG)) {
|
||||
flags = flags | org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG;
|
||||
}
|
||||
if (!header.validateHeader(flags)) {
|
||||
return false;
|
||||
}
|
||||
switch(header.getType()) {
|
||||
|
||||
case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessagesConstants.RUN_OR_CLOSE_PIPE_MESSAGE_ID:
|
||||
return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRunOrClosePipe(
|
||||
ResultInterface_Internal.MANAGER, messageWithHeader);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
System.err.println(e.toString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptWithResponder(org.chromium.mojo.bindings.Message message, org.chromium.mojo.bindings.MessageReceiver receiver) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
int flags = org.chromium.mojo.bindings.MessageHeader.MESSAGE_EXPECTS_RESPONSE_FLAG;
|
||||
if (header.hasFlag(org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG)) {
|
||||
flags = flags | org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG;
|
||||
}
|
||||
if (!header.validateHeader(flags)) {
|
||||
return false;
|
||||
}
|
||||
switch(header.getType()) {
|
||||
|
||||
case org.chromium.mojo.bindings.interfacecontrol.InterfaceControlMessagesConstants.RUN_MESSAGE_ID:
|
||||
return org.chromium.mojo.bindings.InterfaceControlMessagesHelper.handleRun(
|
||||
getCore(), ResultInterface_Internal.MANAGER, messageWithHeader, receiver);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case METHOD_ORDINAL: {
|
||||
|
||||
ResultInterfaceMethodParams data =
|
||||
ResultInterfaceMethodParams.deserialize(messageWithHeader.getPayload());
|
||||
|
||||
getImpl().method(data.a, new ResultInterfaceMethodResponseParamsProxyToResponder(getCore(), receiver, header.getRequestId()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case SYNC_METHOD_ORDINAL: {
|
||||
|
||||
ResultInterfaceSyncMethodParams data =
|
||||
ResultInterfaceSyncMethodParams.deserialize(messageWithHeader.getPayload());
|
||||
|
||||
getImpl().syncMethod(data.a, new ResultInterfaceSyncMethodResponseParamsProxyToResponder(getCore(), receiver, header.getRequestId()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
System.err.println(e.toString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static final class ResultInterfaceMethodParams extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 16;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(16, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public boolean a;
|
||||
|
||||
private ResultInterfaceMethodParams(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public ResultInterfaceMethodParams() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static ResultInterfaceMethodParams deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static ResultInterfaceMethodParams deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static ResultInterfaceMethodParams decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
ResultInterfaceMethodParams result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new ResultInterfaceMethodParams(elementsOrVersion);
|
||||
{
|
||||
|
||||
result.a = decoder0.readBoolean(8, 0);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.a, 8, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static final class ResultInterfaceMethodResponseParams extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 24;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(24, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public ResultInterfaceMethodResponseParamResult result;
|
||||
|
||||
private ResultInterfaceMethodResponseParams(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public ResultInterfaceMethodResponseParams() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static ResultInterfaceMethodResponseParams deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static ResultInterfaceMethodResponseParams deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static ResultInterfaceMethodResponseParams decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
ResultInterfaceMethodResponseParams result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new ResultInterfaceMethodResponseParams(elementsOrVersion);
|
||||
{
|
||||
|
||||
result.result = ResultInterfaceMethodResponseParamResult.decode(decoder0, 8);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.result, 8, false);
|
||||
}
|
||||
}
|
||||
|
||||
static class ResultInterfaceMethodResponseParamsForwardToCallback extends org.chromium.mojo.bindings.SideEffectFreeCloseable
|
||||
implements org.chromium.mojo.bindings.MessageReceiver {
|
||||
private final ResultInterface.Method_Response mCallback;
|
||||
|
||||
ResultInterfaceMethodResponseParamsForwardToCallback(ResultInterface.Method_Response callback) {
|
||||
this.mCallback = callback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(org.chromium.mojo.bindings.Message message) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
if (!header.validateHeader(METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ResultInterfaceMethodResponseParams response = ResultInterfaceMethodResponseParams.deserialize(messageWithHeader.getPayload());
|
||||
|
||||
mCallback.call(response.result);
|
||||
return true;
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class ResultInterfaceMethodResponseParamsProxyToResponder implements ResultInterface.Method_Response {
|
||||
|
||||
private final org.chromium.mojo.system.Core mCore;
|
||||
private final org.chromium.mojo.bindings.MessageReceiver mMessageReceiver;
|
||||
private final long mRequestId;
|
||||
|
||||
ResultInterfaceMethodResponseParamsProxyToResponder(
|
||||
org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiver messageReceiver,
|
||||
long requestId) {
|
||||
mCore = core;
|
||||
mMessageReceiver = messageReceiver;
|
||||
mRequestId = requestId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void call(ResultInterfaceMethodResponseParamResult result) {
|
||||
ResultInterfaceMethodResponseParams _response = new ResultInterfaceMethodResponseParams();
|
||||
|
||||
_response.result = result;
|
||||
|
||||
org.chromium.mojo.bindings.ServiceMessage _message =
|
||||
_response.serializeWithHeader(
|
||||
mCore,
|
||||
new org.chromium.mojo.bindings.MessageHeader(
|
||||
METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG,
|
||||
mRequestId));
|
||||
mMessageReceiver.accept(_message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static final class ResultInterfaceSyncMethodParams extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 16;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(16, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public boolean a;
|
||||
|
||||
private ResultInterfaceSyncMethodParams(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public ResultInterfaceSyncMethodParams() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static ResultInterfaceSyncMethodParams deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static ResultInterfaceSyncMethodParams deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static ResultInterfaceSyncMethodParams decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
ResultInterfaceSyncMethodParams result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new ResultInterfaceSyncMethodParams(elementsOrVersion);
|
||||
{
|
||||
|
||||
result.a = decoder0.readBoolean(8, 0);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.a, 8, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static final class ResultInterfaceSyncMethodResponseParams extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 24;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(24, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public ResultInterfaceSyncMethodResponseParamResult result;
|
||||
|
||||
private ResultInterfaceSyncMethodResponseParams(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public ResultInterfaceSyncMethodResponseParams() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static ResultInterfaceSyncMethodResponseParams deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static ResultInterfaceSyncMethodResponseParams deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static ResultInterfaceSyncMethodResponseParams decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
ResultInterfaceSyncMethodResponseParams result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new ResultInterfaceSyncMethodResponseParams(elementsOrVersion);
|
||||
{
|
||||
|
||||
result.result = ResultInterfaceSyncMethodResponseParamResult.decode(decoder0, 8);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.result, 8, false);
|
||||
}
|
||||
}
|
||||
|
||||
static class ResultInterfaceSyncMethodResponseParamsForwardToCallback extends org.chromium.mojo.bindings.SideEffectFreeCloseable
|
||||
implements org.chromium.mojo.bindings.MessageReceiver {
|
||||
private final ResultInterface.SyncMethod_Response mCallback;
|
||||
|
||||
ResultInterfaceSyncMethodResponseParamsForwardToCallback(ResultInterface.SyncMethod_Response callback) {
|
||||
this.mCallback = callback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean accept(org.chromium.mojo.bindings.Message message) {
|
||||
try {
|
||||
org.chromium.mojo.bindings.ServiceMessage messageWithHeader =
|
||||
message.asServiceMessage();
|
||||
org.chromium.mojo.bindings.MessageHeader header = messageWithHeader.getHeader();
|
||||
if (!header.validateHeader(SYNC_METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG| org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ResultInterfaceSyncMethodResponseParams response = ResultInterfaceSyncMethodResponseParams.deserialize(messageWithHeader.getPayload());
|
||||
|
||||
mCallback.call(response.result);
|
||||
return true;
|
||||
} catch (org.chromium.mojo.bindings.DeserializationException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class ResultInterfaceSyncMethodResponseParamsProxyToResponder implements ResultInterface.SyncMethod_Response {
|
||||
|
||||
private final org.chromium.mojo.system.Core mCore;
|
||||
private final org.chromium.mojo.bindings.MessageReceiver mMessageReceiver;
|
||||
private final long mRequestId;
|
||||
|
||||
ResultInterfaceSyncMethodResponseParamsProxyToResponder(
|
||||
org.chromium.mojo.system.Core core,
|
||||
org.chromium.mojo.bindings.MessageReceiver messageReceiver,
|
||||
long requestId) {
|
||||
mCore = core;
|
||||
mMessageReceiver = messageReceiver;
|
||||
mRequestId = requestId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void call(ResultInterfaceSyncMethodResponseParamResult result) {
|
||||
ResultInterfaceSyncMethodResponseParams _response = new ResultInterfaceSyncMethodResponseParams();
|
||||
|
||||
_response.result = result;
|
||||
|
||||
org.chromium.mojo.bindings.ServiceMessage _message =
|
||||
_response.serializeWithHeader(
|
||||
mCore,
|
||||
new org.chromium.mojo.bindings.MessageHeader(
|
||||
SYNC_METHOD_ORDINAL,
|
||||
org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_RESPONSE_FLAG| org.chromium.mojo.bindings.MessageHeader.MESSAGE_IS_SYNC_FLAG,
|
||||
mRequestId));
|
||||
mMessageReceiver.accept(_message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
// ResultTestError.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// results.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
@NullMarked
|
||||
@SuppressWarnings("NullAway")
|
||||
public final class ResultTestError extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 8;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(8, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
|
||||
private ResultTestError(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public ResultTestError() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static ResultTestError deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static ResultTestError deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static ResultTestError decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
ResultTestError result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new ResultTestError(elementsOrVersion);
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
// Typemapped.java is auto generated by mojom_bindings_generator.py, do not edit
|
||||
|
||||
|
||||
// Copyright 2014 The Chromium Authors
|
||||
// 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:
|
||||
// typemap.test-mojom
|
||||
//
|
||||
|
||||
package org.chromium.golden;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
|
||||
|
||||
@NullMarked
|
||||
@SuppressWarnings("NullAway")
|
||||
public final class Typemapped extends org.chromium.mojo.bindings.Struct {
|
||||
|
||||
private static final int STRUCT_SIZE = 24;
|
||||
private static final org.chromium.mojo.bindings.DataHeader[] VERSION_ARRAY = new org.chromium.mojo.bindings.DataHeader[] {new org.chromium.mojo.bindings.DataHeader(24, 0)};
|
||||
private static final org.chromium.mojo.bindings.DataHeader DEFAULT_STRUCT_INFO = VERSION_ARRAY[0];
|
||||
public byte field;
|
||||
public @Nullable Integer optional;
|
||||
public @Nullable Boolean[] optionalContainer;
|
||||
|
||||
private Typemapped(int version) {
|
||||
super(STRUCT_SIZE, version);
|
||||
}
|
||||
|
||||
public Typemapped() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public static Typemapped deserialize(org.chromium.mojo.bindings.Message message) {
|
||||
return decode(new org.chromium.mojo.bindings.Decoder(message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to the method above, but deserializes from a |ByteBuffer| instance.
|
||||
*
|
||||
* @throws org.chromium.mojo.bindings.DeserializationException on deserialization failure.
|
||||
*/
|
||||
public static Typemapped deserialize(java.nio.ByteBuffer data) {
|
||||
return deserialize(new org.chromium.mojo.bindings.Message(
|
||||
data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Typemapped decode(org.chromium.mojo.bindings.@Nullable Decoder decoder0) {
|
||||
if (decoder0 == null) {
|
||||
return null;
|
||||
}
|
||||
decoder0.increaseStackDepth();
|
||||
Typemapped result;
|
||||
try {
|
||||
org.chromium.mojo.bindings.DataHeader mainDataHeader = decoder0.readAndValidateDataHeader(VERSION_ARRAY);
|
||||
final int elementsOrVersion = mainDataHeader.elementsOrVersion;
|
||||
result = new Typemapped(elementsOrVersion);
|
||||
{
|
||||
|
||||
result.field = decoder0.readByte(8);
|
||||
}
|
||||
{
|
||||
|
||||
if (decoder0.readBoolean(9, 0)) {
|
||||
result.optional = new Integer(decoder0.readInt(12));
|
||||
} else {
|
||||
result.optional = null;
|
||||
}
|
||||
}
|
||||
{
|
||||
|
||||
result.optionalContainer = decoder0.readBooleanNullables(16, org.chromium.mojo.bindings.BindingsHelper.ELEMENT_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
}
|
||||
|
||||
} finally {
|
||||
decoder0.decreaseStackDepth();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected final void encode(org.chromium.mojo.bindings.Encoder encoder) {
|
||||
org.chromium.mojo.bindings.Encoder encoder0 = encoder.getEncoderAtDataOffset(DEFAULT_STRUCT_INFO);
|
||||
|
||||
encoder0.encode(this.field, 8);
|
||||
final boolean optional$flag = this.optional != null;
|
||||
final int optional$value = optional$flag
|
||||
? this.optional
|
||||
: 0;
|
||||
|
||||
encoder0.encode(optional$flag, 9, 0);
|
||||
|
||||
encoder0.encode(optional$value, 12);
|
||||
|
||||
encoder0.encode(this.optionalContainer, 16, org.chromium.mojo.bindings.BindingsHelper.ELEMENT_NULLABLE, org.chromium.mojo.bindings.BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
|
||||
}
|
||||
}
|
@ -638,16 +638,17 @@ class Generator(generator.Generator):
|
||||
# srcjar in the output directory.
|
||||
basename = "%s.srcjar" % self.module.path
|
||||
zip_filename = os.path.join(self.output_dir, basename)
|
||||
with TempDir() as temp_java_root:
|
||||
self.output_dir = os.path.join(temp_java_root, package_path)
|
||||
self._DoGenerateFiles();
|
||||
with action_helpers.atomic_output(zip_filename) as f:
|
||||
zip_helpers.zip_directory(f, temp_java_root)
|
||||
|
||||
if args.java_output_directory:
|
||||
# If requested, generate the java files directly into indicated directory.
|
||||
self.output_dir = os.path.join(args.java_output_directory, package_path)
|
||||
self._DoGenerateFiles();
|
||||
else:
|
||||
with TempDir() as temp_java_root:
|
||||
self.output_dir = os.path.join(temp_java_root, package_path)
|
||||
self._DoGenerateFiles()
|
||||
with action_helpers.atomic_output(zip_filename) as f:
|
||||
zip_helpers.zip_directory(f, temp_java_root)
|
||||
|
||||
def GetJinjaParameters(self):
|
||||
return {
|
||||
|
Reference in New Issue
Block a user