|
| 1 | +package io.cucumber.lambda; |
| 2 | + |
| 3 | +import org.apiguardian.api.API; |
| 4 | + |
| 5 | +import static org.apiguardian.api.API.Status.EXPERIMENTAL; |
| 6 | + |
| 7 | +@API(status = EXPERIMENTAL, since = "7.4.0") |
| 8 | +public interface StepDefinitionFunction { |
| 9 | + |
| 10 | + @FunctionalInterface |
| 11 | + interface C0A0 extends StepDefinitionFunction { |
| 12 | + StepDefinitionBody.A0 accept(); |
| 13 | + |
| 14 | + } |
| 15 | + |
| 16 | + @FunctionalInterface |
| 17 | + interface C1A0<Context> extends StepDefinitionFunction { |
| 18 | + StepDefinitionBody.A0 accept(Context context); |
| 19 | + |
| 20 | + } |
| 21 | + |
| 22 | + @FunctionalInterface |
| 23 | + interface C1A1<Context, T1> extends StepDefinitionFunction { |
| 24 | + StepDefinitionBody.A1<T1> accept(Context context); |
| 25 | + |
| 26 | + } |
| 27 | + |
| 28 | + @FunctionalInterface |
| 29 | + interface C1A2<Context, T1, T2> extends StepDefinitionFunction { |
| 30 | + StepDefinitionBody.A2<T1, T2> accept(Context context); |
| 31 | + |
| 32 | + } |
| 33 | + |
| 34 | + @FunctionalInterface |
| 35 | + interface C1A3<Context, T1, T2, A3> extends StepDefinitionFunction { |
| 36 | + StepDefinitionBody.A3<T1, T2, A3> accept(Context context); |
| 37 | + |
| 38 | + } |
| 39 | + |
| 40 | + @FunctionalInterface |
| 41 | + interface C1A4<Context, T1, T2, T3, T4> extends StepDefinitionFunction { |
| 42 | + StepDefinitionBody.A4<T1, T2, T3, T4> accept(Context context); |
| 43 | + |
| 44 | + } |
| 45 | + |
| 46 | + @FunctionalInterface |
| 47 | + interface C1A5<Context, T1, T2, T3, T4, T5> extends StepDefinitionFunction { |
| 48 | + StepDefinitionBody.A5<T1, T2, T3, T4, T5> accept(Context context); |
| 49 | + |
| 50 | + } |
| 51 | + |
| 52 | + @FunctionalInterface |
| 53 | + interface C1A6<Context, T1, T2, T3, T4, T5, T6> extends StepDefinitionFunction { |
| 54 | + StepDefinitionBody.A6<T1, T2, T3, T4, T5, T6> accept(Context context); |
| 55 | + |
| 56 | + } |
| 57 | + |
| 58 | + @FunctionalInterface |
| 59 | + interface C1A7<Context, T1, T2, T3, T4, T5, T6, T7> extends StepDefinitionFunction { |
| 60 | + StepDefinitionBody.A7<T1, T2, T3, T4, T5, T6, T7> accept(Context context); |
| 61 | + |
| 62 | + } |
| 63 | + |
| 64 | + @FunctionalInterface |
| 65 | + interface C1A8<Context, T1, T2, T3, T4, T5, T6, T7, T8> extends StepDefinitionFunction { |
| 66 | + StepDefinitionBody.A8<T1, T2, T3, T4, T5, T6, T7, T8> accept(Context context); |
| 67 | + |
| 68 | + } |
| 69 | + |
| 70 | + @FunctionalInterface |
| 71 | + interface C1A9<Context, T1, T2, T3, T4, T5, T6, T7, T8, T9> extends StepDefinitionFunction { |
| 72 | + StepDefinitionBody.A9<T1, T2, T3, T4, T5, T6, T7, T8, T9> accept(Context context); |
| 73 | + |
| 74 | + } |
| 75 | + |
| 76 | + interface StepDefinitionBody { |
| 77 | + |
| 78 | + @FunctionalInterface |
| 79 | + interface A0 extends StepDefinitionBody { |
| 80 | + void accept() throws Throwable; |
| 81 | + |
| 82 | + } |
| 83 | + |
| 84 | + @FunctionalInterface |
| 85 | + interface A1<T1> extends StepDefinitionBody { |
| 86 | + void accept(T1 t1) throws Throwable; |
| 87 | + |
| 88 | + } |
| 89 | + |
| 90 | + @FunctionalInterface |
| 91 | + interface A2<T1, T2> extends StepDefinitionBody { |
| 92 | + void accept(T1 t1, T2 t2) throws Throwable; |
| 93 | + |
| 94 | + } |
| 95 | + |
| 96 | + @FunctionalInterface |
| 97 | + interface A3<T1, T2, T3> extends StepDefinitionBody { |
| 98 | + void accept(T1 t1, T2 t2, T3 t3) throws Throwable; |
| 99 | + |
| 100 | + } |
| 101 | + |
| 102 | + @FunctionalInterface |
| 103 | + interface A4<T1, T2, T3, T4> extends StepDefinitionBody { |
| 104 | + void accept(T1 t1, T2 t2, T3 t3, T4 t4) throws Throwable; |
| 105 | + |
| 106 | + } |
| 107 | + |
| 108 | + @FunctionalInterface |
| 109 | + interface A5<T1, T2, T3, T4, T5> extends StepDefinitionBody { |
| 110 | + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Throwable; |
| 111 | + |
| 112 | + } |
| 113 | + |
| 114 | + @FunctionalInterface |
| 115 | + interface A6<T1, T2, T3, T4, T5, T6> extends StepDefinitionBody { |
| 116 | + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) throws Throwable; |
| 117 | + |
| 118 | + } |
| 119 | + |
| 120 | + @FunctionalInterface |
| 121 | + interface A7<T1, T2, T3, T4, T5, T6, T7> extends StepDefinitionBody { |
| 122 | + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) throws Throwable; |
| 123 | + |
| 124 | + } |
| 125 | + |
| 126 | + @FunctionalInterface |
| 127 | + interface A8<T1, T2, T3, T4, T5, T6, T7, T8> extends StepDefinitionBody { |
| 128 | + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) throws Throwable; |
| 129 | + |
| 130 | + } |
| 131 | + |
| 132 | + @FunctionalInterface |
| 133 | + interface A9<T1, T2, T3, T4, T5, T6, T7, T8, T9> extends StepDefinitionBody { |
| 134 | + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) throws Throwable; |
| 135 | + |
| 136 | + } |
| 137 | + |
| 138 | + } |
| 139 | + |
| 140 | +} |
0 commit comments