Introduce KAnnotatedElement and val annotations: List<Annotation>
This commit is contained in:
@@ -23,6 +23,7 @@ import kotlin.reflect.KParameter;
|
||||
import kotlin.reflect.KType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -75,6 +76,11 @@ public abstract class CallableReference implements KCallable {
|
||||
throw error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Annotation> getAnnotations() {
|
||||
throw error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object call(@NotNull Object... args) {
|
||||
throw error();
|
||||
|
||||
@@ -33,5 +33,8 @@ public class ClassReference(override val jClass: Class<*>) : KClass<Any>, Declar
|
||||
override val constructors: Collection<KFunction<Any>>
|
||||
get() = error()
|
||||
|
||||
override val annotations: List<Annotation>
|
||||
get() = error()
|
||||
|
||||
private fun error(): Nothing = throw KotlinReflectionNotSupportedError()
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import kotlin.jvm.KotlinReflectionNotSupportedError;
|
||||
import kotlin.reflect.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@@ -71,6 +72,11 @@ public class FunctionReference
|
||||
throw error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Annotation> getAnnotations() {
|
||||
throw error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object call(@NotNull Object... args) {
|
||||
throw error();
|
||||
|
||||
Reference in New Issue
Block a user