org.jetbrains.kotlin.descriptors
Interface CallableDescriptor
- All Superinterfaces:
- Annotated, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, Named
- All Known Subinterfaces:
- CallableMemberDescriptor, ConstructorDescriptor, FunctionDescriptor, JavaCallableMemberDescriptor, ParameterDescriptor, PropertyAccessorDescriptor, PropertyDescriptor, PropertyGetterDescriptor, PropertySetterDescriptor, ReceiverParameterDescriptor, SamAdapterDescriptor<D>, SimpleFunctionDescriptor, VariableDescriptor
- All Known Implementing Classes:
- AbstractReceiverParameterDescriptor, AccessorForPropertyDescriptor, AccessorForPropertyDescriptor.Getter, AccessorForPropertyDescriptor.Setter, AnonymousFunctionDescriptor, ConstructorDescriptorImpl, ErrorSimpleFunctionDescriptorImpl, FunctionDescriptorImpl, FunctionExpressionDescriptor, JavaConstructorDescriptor, JavaMethodDescriptor, JavaPropertyDescriptor, LazyClassReceiverParameterDescriptor, LocalVariableDescriptor, PropertyAccessorDescriptorImpl, PropertyDescriptorImpl, PropertyGetterDescriptorImpl, PropertySetterDescriptorImpl, ReceiverParameterDescriptorImpl, SimpleFunctionDescriptorImpl, VariableDescriptorImpl, VariableDescriptorWithInitializerImpl
public interface CallableDescriptor
- extends DeclarationDescriptorWithVisibility, DeclarationDescriptorNonRoot
Methods inherited from interface org.jetbrains.kotlin.descriptors.Named |
getName |
getExtensionReceiverParameter
@Nullable
ReceiverParameterDescriptor getExtensionReceiverParameter()
getDispatchReceiverParameter
@Nullable
ReceiverParameterDescriptor getDispatchReceiverParameter()
getTypeParameters
@NotNull
@ReadOnly
java.util.List<TypeParameterDescriptor> getTypeParameters()
getReturnType
@Nullable
KotlinType getReturnType()
- Method may return null for not yet fully initialized object or if error occurred.
getOriginal
@NotNull
CallableDescriptor getOriginal()
- Specified by:
getOriginal
in interface DeclarationDescriptor
- Specified by:
getOriginal
in interface DeclarationDescriptorWithSource
- Returns:
- The descriptor that corresponds to the original declaration of this element.
A descriptor can be obtained from its original by substituting type arguments (of the declaring class
or of the element itself).
returns
this
object if the current descriptor is original itself
substitute
CallableDescriptor substitute(@NotNull
TypeSubstitutor substitutor)
- Specified by:
substitute
in interface DeclarationDescriptor
getValueParameters
@NotNull
java.util.List<ValueParameterDescriptor> getValueParameters()
hasStableParameterNames
boolean hasStableParameterNames()
- Kotlin functions always have stable parameter names that can be reliably used when calling them with named arguments.
Functions loaded from platform definitions (e.g. Java binaries or JS) may have unstable parameter names that vary from
one platform installation to another. These names can not be used reliably for calls with named arguments.
hasSynthesizedParameterNames
boolean hasSynthesizedParameterNames()
- Sometimes parameter names are not available at all (e.g. Java binaries with not enough debug information).
In this case, getName() returns synthetic names such as "p0", "p1" etc.
getOverriddenDescriptors
@NotNull
java.util.Collection<? extends CallableDescriptor> getOverriddenDescriptors()