Support KCallable.callBy with map of parameters to arguments

callBy is able to handle optional parameters.

 #KT-8827 Fixed
This commit is contained in:
Alexander Udalov
2015-08-26 14:40:16 +03:00
parent 0d62680f63
commit 593937d302
24 changed files with 664 additions and 30 deletions
@@ -25,6 +25,7 @@ import org.jetbrains.annotations.NotNull;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Map;
/**
* A superclass for all classes generated by Kotlin compiler for callable references.
@@ -86,6 +87,11 @@ public abstract class CallableReference implements KCallable {
throw error();
}
@Override
public Object callBy(@NotNull Map args) {
throw error();
}
protected static Error error() {
throw new KotlinReflectionNotSupportedError();
}
@@ -22,6 +22,7 @@ import org.jetbrains.annotations.NotNull;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Map;
@SuppressWarnings("deprecation")
public class FunctionReference
@@ -82,6 +83,11 @@ public class FunctionReference
throw error();
}
@Override
public Object callBy(@NotNull Map args) {
throw error();
}
protected static Error error() {
throw new KotlinReflectionNotSupportedError();
}