Package kotlin.jvm.internal
Class CallableReference
java.lang.Object
kotlin.jvm.internal.CallableReference
- All Implemented Interfaces:
Serializable,kotlin.reflect.KAnnotatedElement,kotlin.reflect.KCallable
- Direct Known Subclasses:
FunctionReference,PropertyReference
public abstract class CallableReference
extends Object
implements kotlin.reflect.KCallable, Serializable
A superclass for all classes generated by Kotlin compiler for callable references.
All methods from KCallable should be implemented here and should delegate to the actual implementation, loaded dynamically
and stored in the
reflected field.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface kotlin.reflect.KCallable
kotlin.reflect.KCallable.DefaultImpls -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCallableReference(Object receiver) protectedCallableReference(Object receiver, Class owner, String name, String signature, boolean isTopLevel) -
Method Summary
Modifier and TypeMethodDescriptionkotlin.reflect.KCallablecompute()protected abstract kotlin.reflect.KCallablegetName()kotlin.reflect.KDeclarationContainergetOwner()List<kotlin.reflect.KParameter>protected kotlin.reflect.KCallablekotlin.reflect.KTypeList<kotlin.reflect.KTypeParameter>kotlin.reflect.KVisibilitybooleanbooleanisFinal()booleanisOpen()boolean
-
Field Details
-
receiver
-
NO_RECEIVER
-
-
Constructor Details
-
CallableReference
public CallableReference() -
CallableReference
-
CallableReference
-
-
Method Details
-
computeReflected
protected abstract kotlin.reflect.KCallable computeReflected() -
getBoundReceiver
-
compute
@SinceKotlin(version="1.1") public kotlin.reflect.KCallable compute() -
getReflected
@SinceKotlin(version="1.1") protected kotlin.reflect.KCallable getReflected() -
getOwner
public kotlin.reflect.KDeclarationContainer getOwner()- Returns:
- the class or package where the callable should be located, usually specified on the LHS of the '::' operator
-
getName
- Specified by:
getNamein interfacekotlin.reflect.KCallable- Returns:
- Kotlin name of the callable, the one which was declared in the source code (@JvmName doesn't change it)
-
getSignature
- Returns:
- JVM signature of the callable, e.g. "println(Ljava/lang/Object;)V". If this is a property reference, returns the JVM signature of its getter, e.g. "getFoo(Ljava/lang/String;)I". If the property has no getter in the bytecode (e.g. private property in a class), it's still the signature of the imaginary default getter that would be generated otherwise. Note that technically the signature itself is not even used as a signature per se in reflection implementation, but only as a unique and unambiguous way to map a function/property descriptor to a string.
-
getParameters
- Specified by:
getParametersin interfacekotlin.reflect.KCallable
-
getReturnType
public kotlin.reflect.KType getReturnType()- Specified by:
getReturnTypein interfacekotlin.reflect.KCallable
-
getAnnotations
- Specified by:
getAnnotationsin interfacekotlin.reflect.KAnnotatedElement
-
getTypeParameters
- Specified by:
getTypeParametersin interfacekotlin.reflect.KCallable
-
call
- Specified by:
callin interfacekotlin.reflect.KCallable
-
callBy
- Specified by:
callByin interfacekotlin.reflect.KCallable
-
getVisibility
@SinceKotlin(version="1.1") public kotlin.reflect.KVisibility getVisibility()- Specified by:
getVisibilityin interfacekotlin.reflect.KCallable
-
isFinal
@SinceKotlin(version="1.1") public boolean isFinal()- Specified by:
isFinalin interfacekotlin.reflect.KCallable
-
isOpen
@SinceKotlin(version="1.1") public boolean isOpen()- Specified by:
isOpenin interfacekotlin.reflect.KCallable
-
isAbstract
@SinceKotlin(version="1.1") public boolean isAbstract()- Specified by:
isAbstractin interfacekotlin.reflect.KCallable
-
isSuspend
@SinceKotlin(version="1.3") public boolean isSuspend()- Specified by:
isSuspendin interfacekotlin.reflect.KCallable
-