1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file was generated using
6 // mojo/tools/generate_java_callback_interfaces.py
8 package org.chromium.mojo.bindings;
11 * Contains a generic interface for callbacks.
13 public interface Callbacks {
16 * A generic 1-argument callback.
18 * @param <T1> the type of argument 1.
20 interface Callback1<T1> {
24 public void call(T1 arg1);
28 * A generic 2-argument callback.
30 * @param <T1> the type of argument 1.
31 * @param <T2> the type of argument 2.
33 interface Callback2<T1, T2> {
37 public void call(T1 arg1, T2 arg2);
41 * A generic 3-argument callback.
43 * @param <T1> the type of argument 1.
44 * @param <T2> the type of argument 2.
45 * @param <T3> the type of argument 3.
47 interface Callback3<T1, T2, T3> {
51 public void call(T1 arg1, T2 arg2, T3 arg3);
55 * A generic 4-argument callback.
57 * @param <T1> the type of argument 1.
58 * @param <T2> the type of argument 2.
59 * @param <T3> the type of argument 3.
60 * @param <T4> the type of argument 4.
62 interface Callback4<T1, T2, T3, T4> {
66 public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
70 * A generic 5-argument callback.
72 * @param <T1> the type of argument 1.
73 * @param <T2> the type of argument 2.
74 * @param <T3> the type of argument 3.
75 * @param <T4> the type of argument 4.
76 * @param <T5> the type of argument 5.
78 interface Callback5<T1, T2, T3, T4, T5> {
82 public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
86 * A generic 6-argument callback.
88 * @param <T1> the type of argument 1.
89 * @param <T2> the type of argument 2.
90 * @param <T3> the type of argument 3.
91 * @param <T4> the type of argument 4.
92 * @param <T5> the type of argument 5.
93 * @param <T6> the type of argument 6.
95 interface Callback6<T1, T2, T3, T4, T5, T6> {
99 public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
103 * A generic 7-argument callback.
105 * @param <T1> the type of argument 1.
106 * @param <T2> the type of argument 2.
107 * @param <T3> the type of argument 3.
108 * @param <T4> the type of argument 4.
109 * @param <T5> the type of argument 5.
110 * @param <T6> the type of argument 6.
111 * @param <T7> the type of argument 7.
113 interface Callback7<T1, T2, T3, T4, T5, T6, T7> {
117 public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);