org.jetbrains.kotlin.load.java.descriptors
Class JavaMethodDescriptor
java.lang.Object
org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
org.jetbrains.kotlin.descriptors.impl.FunctionDescriptorImpl
org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl
org.jetbrains.kotlin.load.java.descriptors.JavaMethodDescriptor
- All Implemented Interfaces:
- CallableDescriptor, CallableMemberDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, FunctionDescriptor, MemberDescriptor, Named, SimpleFunctionDescriptor, JavaCallableMemberDescriptor
public class JavaMethodDescriptor
- extends SimpleFunctionDescriptorImpl
- implements JavaCallableMemberDescriptor
|
Method Summary |
static JavaMethodDescriptor |
createJavaMethod(DeclarationDescriptor containingDeclaration,
Annotations annotations,
Name name,
SourceElement source)
|
protected JavaMethodDescriptor |
createSubstitutedCopy(DeclarationDescriptor newOwner,
FunctionDescriptor original,
CallableMemberDescriptor.Kind kind,
Name newName,
Annotations annotations,
SourceElement source)
|
JavaMethodDescriptor |
enhance(KotlinType enhancedReceiverType,
java.util.List<KotlinType> enhancedValueParametersTypes,
KotlinType enhancedReturnType)
|
boolean |
hasStableParameterNames()
Kotlin functions always have stable parameter names that can be reliably used when calling them with named arguments. |
boolean |
hasSynthesizedParameterNames()
Sometimes parameter names are not available at all (e.g. |
SimpleFunctionDescriptorImpl |
initialize(KotlinType receiverParameterType,
ReceiverParameterDescriptor dispatchReceiverParameter,
java.util.List<? extends TypeParameterDescriptor> typeParameters,
java.util.List<ValueParameterDescriptor> unsubstitutedValueParameters,
KotlinType unsubstitutedReturnType,
Modality modality,
Visibility visibility)
|
void |
setParameterNamesStatus(boolean hasStableParameterNames,
boolean hasSynthesizedParameterNames)
|
| Methods inherited from class org.jetbrains.kotlin.descriptors.impl.FunctionDescriptorImpl |
accept, doSubstitute, getDispatchReceiverParameter, getExtensionReceiverParameter, getExtensionReceiverParameterType, getInitialSignatureDescriptor, getKind, getModality, getOverriddenDescriptors, getReturnType, getSubstitutedValueParameters, getTypeParameters, getUserData, getValueParameters, getVisibility, isExternal, isHeader, isHiddenForResolutionEverywhereBesideSupercalls, isHiddenToOvercomeSignatureClash, isImpl, isInfix, isInline, isOperator, isSuspend, isTailrec, newCopyBuilder, setExternal, setHasStableParameterNames, setHasSynthesizedParameterNames, setHeader, setHiddenToOvercomeSignatureClash, setImpl, setInfix, setInline, setOperator, setOverriddenDescriptors, setReturnType, setSuspend, setTailrec, setVisibility, substitute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jetbrains.kotlin.descriptors.Named |
getName |
| Methods inherited from interface org.jetbrains.kotlin.descriptors.FunctionDescriptor |
getContainingDeclaration, getInitialSignatureDescriptor, getOverriddenDescriptors, getUserData, isHiddenForResolutionEverywhereBesideSupercalls, isHiddenToOvercomeSignatureClash, isInfix, isInline, isOperator, isSuspend, isTailrec, substitute |
JavaMethodDescriptor
protected JavaMethodDescriptor(@NotNull
DeclarationDescriptor containingDeclaration,
@Nullable
SimpleFunctionDescriptor original,
@NotNull
Annotations annotations,
@NotNull
Name name,
@NotNull
CallableMemberDescriptor.Kind kind,
@NotNull
SourceElement source)
createJavaMethod
@NotNull
public static JavaMethodDescriptor createJavaMethod(@NotNull
DeclarationDescriptor containingDeclaration,
@NotNull
Annotations annotations,
@NotNull
Name name,
@NotNull
SourceElement source)
initialize
@NotNull
public SimpleFunctionDescriptorImpl initialize(@Nullable
KotlinType receiverParameterType,
@Nullable
ReceiverParameterDescriptor dispatchReceiverParameter,
@NotNull
java.util.List<? extends TypeParameterDescriptor> typeParameters,
@NotNull
java.util.List<ValueParameterDescriptor> unsubstitutedValueParameters,
@Nullable
KotlinType unsubstitutedReturnType,
@Nullable
Modality modality,
@NotNull
Visibility visibility)
- Overrides:
initialize in class SimpleFunctionDescriptorImpl
hasStableParameterNames
public boolean hasStableParameterNames()
- Description copied from interface:
CallableDescriptor
- 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.
- Specified by:
hasStableParameterNames in interface CallableDescriptor- Overrides:
hasStableParameterNames in class FunctionDescriptorImpl
hasSynthesizedParameterNames
public boolean hasSynthesizedParameterNames()
- Description copied from interface:
CallableDescriptor
- 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.
- Specified by:
hasSynthesizedParameterNames in interface CallableDescriptor- Overrides:
hasSynthesizedParameterNames in class FunctionDescriptorImpl
setParameterNamesStatus
public void setParameterNamesStatus(boolean hasStableParameterNames,
boolean hasSynthesizedParameterNames)
createSubstitutedCopy
@NotNull
protected JavaMethodDescriptor createSubstitutedCopy(@NotNull
DeclarationDescriptor newOwner,
@Nullable
FunctionDescriptor original,
@NotNull
CallableMemberDescriptor.Kind kind,
@Nullable
Name newName,
@NotNull
Annotations annotations,
@NotNull
SourceElement source)
- Overrides:
createSubstitutedCopy in class SimpleFunctionDescriptorImpl
enhance
@NotNull
public JavaMethodDescriptor enhance(@Nullable
KotlinType enhancedReceiverType,
@NotNull
java.util.List<KotlinType> enhancedValueParametersTypes,
@NotNull
KotlinType enhancedReturnType)
- Specified by:
enhance in interface JavaCallableMemberDescriptor