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 {
26 * A generic 1-argument callback.
28 * @param <T1> the type of argument 1.
30 interface Callback1<T1> {
34 public void call(T1 arg1);
38 * A generic 2-argument callback.
40 * @param <T1> the type of argument 1.
41 * @param <T2> the type of argument 2.
43 interface Callback2<T1, T2> {
47 public void call(T1 arg1, T2 arg2);
51 * A generic 3-argument callback.
53 * @param <T1> the type of argument 1.
54 * @param <T2> the type of argument 2.
55 * @param <T3> the type of argument 3.
57 interface Callback3<T1, T2, T3> {
61 public void call(T1 arg1, T2 arg2, T3 arg3);
65 * A generic 4-argument callback.
67 * @param <T1> the type of argument 1.
68 * @param <T2> the type of argument 2.
69 * @param <T3> the type of argument 3.
70 * @param <T4> the type of argument 4.
72 interface Callback4<T1, T2, T3, T4> {
76 public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
80 * A generic 5-argument callback.
82 * @param <T1> the type of argument 1.
83 * @param <T2> the type of argument 2.
84 * @param <T3> the type of argument 3.
85 * @param <T4> the type of argument 4.
86 * @param <T5> the type of argument 5.
88 interface Callback5<T1, T2, T3, T4, T5> {
92 public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
96 * A generic 6-argument callback.
98 * @param <T1> the type of argument 1.
99 * @param <T2> the type of argument 2.
100 * @param <T3> the type of argument 3.
101 * @param <T4> the type of argument 4.
102 * @param <T5> the type of argument 5.
103 * @param <T6> the type of argument 6.
105 interface Callback6<T1, T2, T3, T4, T5, T6> {
109 public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
113 * A generic 7-argument callback.
115 * @param <T1> the type of argument 1.
116 * @param <T2> the type of argument 2.
117 * @param <T3> the type of argument 3.
118 * @param <T4> the type of argument 4.
119 * @param <T5> the type of argument 5.
120 * @param <T6> the type of argument 6.
121 * @param <T7> the type of argument 7.
123 interface Callback7<T1, T2, T3, T4, T5, T6, T7> {
127 public void call(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);