Top Description Inners Fields Constructors Methods
kotlin.jvm.internal

public abstract Class CallableReference

extends Object
implements kotlin.reflect.KCallable, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
kotlin.jvm.internal.PropertyReference, kotlin.jvm.internal.FunctionReference
Annotations
@SuppressWarnings:unchecked, NullableProblems, rawtypes
Imports
kotlin.SinceKotlin, kotlin.jvm.KotlinReflectionNotSupportedError, kotlin.reflect.*, java.io.ObjectStreamException, .Serializable, java.lang.annotation.Annotation, java.util.List, .Map

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 CallableReference#reflected field.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final boolean
private final String
public static final Object
private final Class<T>
protected final Object
private transient kotlin.reflect.KCallable
private final String

Constructor Summary

AccessConstructor and Description
public
protected
protected
CallableReference(Object receiver, Class<T> owner, String name, String signature, boolean isTopLevel)

Method Summary

Modifier and TypeMethod and Description
public Object
call(Object... args)

public Object
callBy(Map<K, V> args)

public kotlin.reflect.KCallable
protected abstract kotlin.reflect.KCallable
public List<Annotation>
public Object
public String

Returns:

Kotlin name of the callable, the one which was declared in the source code (@JvmName doesn't change it)
getName
()

public kotlin.reflect.KDeclarationContainer

Returns:

the class or package where the callable should be located, usually specified on the LHS of the '::' operator
getOwner
()

public List<kotlin.reflect.KParameter>
protected kotlin.reflect.KCallable
public kotlin.reflect.KType
public String

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.
getSignature
()

public List<kotlin.reflect.KTypeParameter>
public kotlin.reflect.KVisibility
public boolean
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isTopLevelback to summary
private final boolean isTopLevel
Annotations
@kotlin.SinceKotlin
nameback to summary
private final String name
Annotations
@kotlin.SinceKotlin
NO_RECEIVERback to summary
public static final Object NO_RECEIVER
Annotations
@kotlin.SinceKotlin
ownerback to summary
private final Class<T> owner
Annotations
@kotlin.SinceKotlin
receiverback to summary
protected final Object receiver
Annotations
@kotlin.SinceKotlin
reflectedback to summary
private transient kotlin.reflect.KCallable reflected
signatureback to summary
private final String signature
Annotations
@kotlin.SinceKotlin

Constructor Detail

CallableReferenceback to summary
public CallableReference()
CallableReferenceback to summary
protected CallableReference(Object receiver)
Annotations
@kotlin.SinceKotlin
CallableReferenceback to summary
protected CallableReference(Object receiver, Class<T> owner, String name, String signature, boolean isTopLevel)
Annotations
@kotlin.SinceKotlin

Method Detail

callback to summary
public Object call(Object... args)
Annotations
@Override
callByback to summary
public Object callBy(Map<K, V> args)
Annotations
@Override
computeback to summary
public kotlin.reflect.KCallable compute()
Annotations
@kotlin.SinceKotlin
computeReflectedback to summary
protected abstract kotlin.reflect.KCallable computeReflected()
getAnnotationsback to summary
public List<Annotation> getAnnotations()
Annotations
@Override
getBoundReceiverback to summary
public Object getBoundReceiver()
Annotations
@kotlin.SinceKotlin
getNameback to summary
public String getName()
Returns:String

Kotlin name of the callable, the one which was declared in the source code (@JvmName doesn't change it)

Annotations
@Override
getOwnerback to summary
public kotlin.reflect.KDeclarationContainer getOwner()
Returns:kotlin.reflect.KDeclarationContainer

the class or package where the callable should be located, usually specified on the LHS of the '::' operator

getParametersback to summary
public List<kotlin.reflect.KParameter> getParameters()
Annotations
@Override
getReflectedback to summary
protected kotlin.reflect.KCallable getReflected()
Annotations
@kotlin.SinceKotlin
getReturnTypeback to summary
public kotlin.reflect.KType getReturnType()
Annotations
@Override
getSignatureback to summary
public String getSignature()
Returns:String

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.

getTypeParametersback to summary
public List<kotlin.reflect.KTypeParameter> getTypeParameters()
Annotations
@Override
@kotlin.SinceKotlin
getVisibilityback to summary
public kotlin.reflect.KVisibility getVisibility()
Annotations
@Override
@kotlin.SinceKotlin
isAbstractback to summary
public boolean isAbstract()
Annotations
@Override
@kotlin.SinceKotlin
isFinalback to summary
public boolean isFinal()
Annotations
@Override
@kotlin.SinceKotlin
isOpenback to summary
public boolean isOpen()
Annotations
@Override
@kotlin.SinceKotlin
isSuspendback to summary
public boolean isSuspend()
Annotations
@Override
@kotlin.SinceKotlin
kotlin.jvm.internal back to summary

private Class CallableReference.NoReceiver

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@kotlin.SinceKotlin

Field Summary

Modifier and TypeField and Description
private static final CallableReference.NoReceiver

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final CallableReference.NoReceiver INSTANCE

Constructor Detail

NoReceiverback to summary
private NoReceiver()

Method Detail

readResolveback to summary
private Object readResolve() throws ObjectStreamException