Introduce kotlin.jvm.functions.FunctionN
#KT-13764
This commit is contained in:
committed by
Ilya Gorbunov
parent
51979b9ffa
commit
082da82f3e
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package kotlin.jvm.functions
|
||||||
|
|
||||||
|
import kotlin.jvm.internal.FunctionBase
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A function that takes N >= 23 arguments.
|
||||||
|
*
|
||||||
|
* This interface must only be used in Java sources to reference a Kotlin function type with more than 22 arguments.
|
||||||
|
*/
|
||||||
|
@SinceKotlin("1.3")
|
||||||
|
interface FunctionN<out R> : Function<R>, FunctionBase<R> {
|
||||||
|
/**
|
||||||
|
* Invokes the function with the specified arguments.
|
||||||
|
*
|
||||||
|
* Must **throw exception** if the length of passed [args] is not equal to the parameter count returned by [arity].
|
||||||
|
*
|
||||||
|
* @param args arguments to the function
|
||||||
|
*/
|
||||||
|
operator fun invoke(vararg args: Any?): R
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of arguments that must be passed to this function.
|
||||||
|
*/
|
||||||
|
override val arity: Int
|
||||||
|
}
|
||||||
@@ -350,6 +350,11 @@ public abstract interface class kotlin/jvm/functions/Function9 : kotlin/Function
|
|||||||
public abstract fun invoke (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
public abstract fun invoke (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract interface class kotlin/jvm/functions/FunctionN : kotlin/Function, kotlin/jvm/internal/FunctionBase {
|
||||||
|
public abstract fun getArity ()I
|
||||||
|
public abstract fun invoke ([Ljava/lang/Object;)Ljava/lang/Object;
|
||||||
|
}
|
||||||
|
|
||||||
public final class kotlin/jvm/internal/ArrayIteratorKt {
|
public final class kotlin/jvm/internal/ArrayIteratorKt {
|
||||||
public static final fun iterator ([Ljava/lang/Object;)Ljava/util/Iterator;
|
public static final fun iterator ([Ljava/lang/Object;)Ljava/util/Iterator;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -3172,6 +3172,11 @@ public abstract interface class kotlin/jvm/functions/Function9 : kotlin/Function
|
|||||||
public abstract fun invoke (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
public abstract fun invoke (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract interface class kotlin/jvm/functions/FunctionN : kotlin/Function, kotlin/jvm/internal/FunctionBase {
|
||||||
|
public abstract fun getArity ()I
|
||||||
|
public abstract fun invoke ([Ljava/lang/Object;)Ljava/lang/Object;
|
||||||
|
}
|
||||||
|
|
||||||
public final class kotlin/jvm/internal/ArrayIteratorKt {
|
public final class kotlin/jvm/internal/ArrayIteratorKt {
|
||||||
public static final fun iterator ([Ljava/lang/Object;)Ljava/util/Iterator;
|
public static final fun iterator ([Ljava/lang/Object;)Ljava/util/Iterator;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user