org.jetbrains.kotlin.load.java.descriptors
Class JavaMethodDescriptor

java.lang.Object
  extended by org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
      extended by org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
          extended by org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
              extended by org.jetbrains.kotlin.descriptors.impl.FunctionDescriptorImpl
                  extended by org.jetbrains.kotlin.descriptors.impl.SimpleFunctionDescriptorImpl
                      extended by org.jetbrains.kotlin.load.java.descriptors.JavaMethodDescriptor
All Implemented Interfaces:
Annotated, CallableDescriptor, CallableMemberDescriptor, DeclarationDescriptor, DeclarationDescriptorNonRoot, DeclarationDescriptorWithSource, DeclarationDescriptorWithVisibility, FunctionDescriptor, MemberDescriptor, Named, SimpleFunctionDescriptor, JavaCallableMemberDescriptor

public class JavaMethodDescriptor
extends SimpleFunctionDescriptorImpl
implements JavaCallableMemberDescriptor


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jetbrains.kotlin.descriptors.impl.FunctionDescriptorImpl
FunctionDescriptorImpl.CopyConfiguration
 
Nested classes/interfaces inherited from interface org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
CallableMemberDescriptor.Kind
 
Nested classes/interfaces inherited from interface org.jetbrains.kotlin.descriptors.FunctionDescriptor
FunctionDescriptor.CopyBuilder<D extends FunctionDescriptor>
 
Constructor Summary
protected JavaMethodDescriptor(DeclarationDescriptor containingDeclaration, SimpleFunctionDescriptor original, Annotations annotations, Name name, CallableMemberDescriptor.Kind kind, SourceElement source)
           
 
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, boolean preserveSource)
           
 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.SimpleFunctionDescriptorImpl
copy, create, getOriginal, newCopyBuilder
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.FunctionDescriptorImpl
accept, doSubstitute, getDispatchReceiverParameter, getExtensionReceiverParameter, getExtensionReceiverParameterType, getInitialSignatureDescriptor, getKind, getModality, getOverriddenDescriptors, getReturnType, getSourceToUseForCopy, getSubstitutedValueParameters, getTypeParameters, getValueParameters, getVisibility, isExternal, isHiddenToOvercomeSignatureClash, isInfix, isInline, isOperator, isTailrec, setExternal, setHasStableParameterNames, setHasSynthesizedParameterNames, setHidden, setInfix, setInitialSignatureDescriptor, setInline, setOperator, setOverriddenDescriptors, setReturnType, setTailrec, setVisibility, substitute
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorNonRootImpl
getContainingDeclaration, getSource
 
Methods inherited from class org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorImpl
acceptVoid, getName, toString, toString
 
Methods inherited from class org.jetbrains.kotlin.descriptors.annotations.AnnotatedImpl
getAnnotations
 
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.CallableMemberDescriptor
copy, getKind, getOriginal, getOverriddenDescriptors, setOverriddenDescriptors
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.CallableDescriptor
getDispatchReceiverParameter, getExtensionReceiverParameter, getReturnType, getTypeParameters, getValueParameters, substitute
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.MemberDescriptor
getModality, getVisibility
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorNonRoot
getContainingDeclaration
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
getSource
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.DeclarationDescriptor
accept, acceptVoid
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.annotations.Annotated
getAnnotations
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.Named
getName
 
Methods inherited from interface org.jetbrains.kotlin.descriptors.FunctionDescriptor
getContainingDeclaration, getInitialSignatureDescriptor, getOverriddenDescriptors, isExternal, isHiddenToOvercomeSignatureClash, isInfix, isInline, isOperator, isTailrec, substitute
 

Constructor Detail

JavaMethodDescriptor

protected JavaMethodDescriptor(@NotNull
                               DeclarationDescriptor containingDeclaration,
                               @Nullable
                               SimpleFunctionDescriptor original,
                               @NotNull
                               Annotations annotations,
                               @NotNull
                               Name name,
                               @NotNull
                               CallableMemberDescriptor.Kind kind,
                               @NotNull
                               SourceElement source)
Method Detail

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,
                                                             boolean preserveSource)
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