Draft Kotlin Coroutines 1.3 ABI & API:
* SuccessOrFailure inline class is introduced * Continuation.resumeWith(SuccessOrFailure) * createCoroutineUnintercepted * [Restricted]ContinuationImpl as named suspending function base * [Restricted]SuspendLambda as suspending lambda base * SuspendFunction[01] interfaces for efficient createCoroutine * Serializable coroutine classes
This commit is contained in:
committed by
Denis Zharkov
parent
fb5e11dfc6
commit
8bbd78ca9a
@@ -69,6 +69,11 @@ public class Reflection {
|
||||
return factory.renderLambdaToString(lambda);
|
||||
}
|
||||
|
||||
@SinceKotlin(version = "1.3")
|
||||
public static String renderLambdaToString(FunctionBase lambda) {
|
||||
return factory.renderLambdaToString(lambda);
|
||||
}
|
||||
|
||||
// Functions
|
||||
|
||||
public static KFunction function(FunctionReference f) {
|
||||
|
||||
@@ -33,6 +33,11 @@ public class ReflectionFactory {
|
||||
|
||||
@SinceKotlin(version = "1.1")
|
||||
public String renderLambdaToString(Lambda lambda) {
|
||||
return renderLambdaToString((FunctionBase) lambda);
|
||||
}
|
||||
|
||||
@SinceKotlin(version = "1.3")
|
||||
public String renderLambdaToString(FunctionBase lambda) {
|
||||
String result = lambda.getClass().getGenericInterfaces()[0].toString();
|
||||
return result.startsWith(KOTLIN_JVM_FUNCTIONS) ? result.substring(KOTLIN_JVM_FUNCTIONS.length()) : result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user