org.jetbrains.kotlin.resolve.calls.model
Class ResolvedCallImpl<D extends CallableDescriptor>

java.lang.Object
  extended by org.jetbrains.kotlin.resolve.calls.model.ResolvedCallImpl<D>
All Implemented Interfaces:
MutableResolvedCall<D>, ResolvedCall<D>

public class ResolvedCallImpl<D extends CallableDescriptor>
extends java.lang.Object
implements MutableResolvedCall<D>


Field Summary
static com.intellij.util.Function<MutableResolvedCall<?>,CallableDescriptor> MAP_TO_CANDIDATE
           
static com.intellij.util.Function<MutableResolvedCall<?>,CallableDescriptor> MAP_TO_RESULT
           
 
Constructor Summary
ResolvedCallImpl(Call call, D candidateDescriptor, ReceiverValue dispatchReceiver, ReceiverValue extensionReceiver, ExplicitReceiverKind explicitReceiverKind, TypeSubstitutor knownTypeParametersSubstitutor, DelegatingBindingTrace trace, TracingStrategy tracing, MutableDataFlowInfoForArguments dataFlowInfoForArguments)
           
 
Method Summary
 void addStatus(ResolutionStatus status)
           
static
<D extends CallableDescriptor>
ResolvedCallImpl<D>
create(ResolutionCandidate<D> candidate, DelegatingBindingTrace trace, TracingStrategy tracing, MutableDataFlowInfoForArguments dataFlowInfoForArguments)
           
 ArgumentMapping getArgumentMapping(ValueArgument valueArgument)
          The result of mapping the value argument to a parameter
 Call getCall()
          The call that was resolved to this ResolvedCall
 D getCandidateDescriptor()
          A target callable descriptor as it was accessible in the corresponding scope, i.e.
 ConstraintSystem getConstraintSystem()
           
 MutableDataFlowInfoForArguments getDataFlowInfoForArguments()
          Data flow info for each argument and the result data flow info
 ReceiverValue getDispatchReceiver()
          If the target was a member of a class, this is the object of that class to call it on
 ExplicitReceiverKind getExplicitReceiverKind()
          Determines whether receiver argument or this object is substituted for explicit receiver
 Receiver getExtensionReceiver()
          If the target was an extension function or property, this is the value for its receiver parameter
 TypeSubstitutor getKnownTypeParametersSubstitutor()
           
 D getResultingDescriptor()
          Type arguments are substituted.
 KotlinType getSmartCastDispatchReceiverType()
           
 ResolutionStatus getStatus()
           
 DelegatingBindingTrace getTrace()
           
 TracingStrategy getTracingStrategy()
           
 java.util.Map<TypeParameterDescriptor,KotlinType> getTypeArguments()
          What's substituted for type parameters
 java.util.Map<ValueParameterDescriptor,ResolvedValueArgument> getValueArguments()
          Values (arguments) for value parameters
 java.util.List<ResolvedValueArgument> getValueArgumentsByIndex()
          Values (arguments) for value parameters indexed by parameter index
 boolean hasInferredReturnType()
           
 boolean isCompleted()
           
 boolean isSafeCall()
           
 void markCallAsCompleted()
           
 void recordArgumentMatchStatus(ValueArgument valueArgument, ArgumentMatchStatus matchStatus)
           
 void recordValueArgument(ValueParameterDescriptor valueParameter, ResolvedValueArgument valueArgument)
           
 void setConstraintSystem(ConstraintSystem constraintSystem)
           
 void setResultingSubstitutor(TypeSubstitutor substitutor)
           
 void setSmartCastDispatchReceiverType(KotlinType smartCastDispatchReceiverType)
           
 void setStatusToSuccess()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAP_TO_CANDIDATE

public static final com.intellij.util.Function<MutableResolvedCall<?>,CallableDescriptor> MAP_TO_CANDIDATE

MAP_TO_RESULT

public static final com.intellij.util.Function<MutableResolvedCall<?>,CallableDescriptor> MAP_TO_RESULT
Constructor Detail

ResolvedCallImpl

public ResolvedCallImpl(@NotNull
                        Call call,
                        @NotNull
                        D candidateDescriptor,
                        @Nullable
                        ReceiverValue dispatchReceiver,
                        @Nullable
                        ReceiverValue extensionReceiver,
                        @NotNull
                        ExplicitReceiverKind explicitReceiverKind,
                        @Nullable
                        TypeSubstitutor knownTypeParametersSubstitutor,
                        @NotNull
                        DelegatingBindingTrace trace,
                        @NotNull
                        TracingStrategy tracing,
                        @NotNull
                        MutableDataFlowInfoForArguments dataFlowInfoForArguments)
Method Detail

create

@NotNull
public static <D extends CallableDescriptor> ResolvedCallImpl<D> create(@NotNull
                                                                                ResolutionCandidate<D> candidate,
                                                                                @NotNull
                                                                                DelegatingBindingTrace trace,
                                                                                @NotNull
                                                                                TracingStrategy tracing,
                                                                                @NotNull
                                                                                MutableDataFlowInfoForArguments dataFlowInfoForArguments)

getStatus

@NotNull
public ResolutionStatus getStatus()
Specified by:
getStatus in interface ResolvedCall<D extends CallableDescriptor>

addStatus

public void addStatus(@NotNull
                      ResolutionStatus status)
Specified by:
addStatus in interface MutableResolvedCall<D extends CallableDescriptor>

setStatusToSuccess

public void setStatusToSuccess()
Specified by:
setStatusToSuccess in interface MutableResolvedCall<D extends CallableDescriptor>

getTrace

@NotNull
public DelegatingBindingTrace getTrace()
Specified by:
getTrace in interface MutableResolvedCall<D extends CallableDescriptor>

getTracingStrategy

@NotNull
public TracingStrategy getTracingStrategy()
Specified by:
getTracingStrategy in interface MutableResolvedCall<D extends CallableDescriptor>

getCall

@NotNull
public Call getCall()
Description copied from interface: ResolvedCall
The call that was resolved to this ResolvedCall

Specified by:
getCall in interface ResolvedCall<D extends CallableDescriptor>

getCandidateDescriptor

@NotNull
public D getCandidateDescriptor()
Description copied from interface: ResolvedCall
A target callable descriptor as it was accessible in the corresponding scope, i.e. with type arguments not substituted

Specified by:
getCandidateDescriptor in interface ResolvedCall<D extends CallableDescriptor>

getResultingDescriptor

@NotNull
public D getResultingDescriptor()
Description copied from interface: ResolvedCall
Type arguments are substituted. This descriptor is guaranteed to have NO declared type parameters

Specified by:
getResultingDescriptor in interface ResolvedCall<D extends CallableDescriptor>

setResultingSubstitutor

public void setResultingSubstitutor(@NotNull
                                    TypeSubstitutor substitutor)
Specified by:
setResultingSubstitutor in interface MutableResolvedCall<D extends CallableDescriptor>

setConstraintSystem

public void setConstraintSystem(@NotNull
                                ConstraintSystem constraintSystem)
Specified by:
setConstraintSystem in interface MutableResolvedCall<D extends CallableDescriptor>

getConstraintSystem

@Nullable
public ConstraintSystem getConstraintSystem()
Specified by:
getConstraintSystem in interface MutableResolvedCall<D extends CallableDescriptor>

recordValueArgument

public void recordValueArgument(@NotNull
                                ValueParameterDescriptor valueParameter,
                                @NotNull
                                ResolvedValueArgument valueArgument)
Specified by:
recordValueArgument in interface MutableResolvedCall<D extends CallableDescriptor>

getExtensionReceiver

@Nullable
public Receiver getExtensionReceiver()
Description copied from interface: ResolvedCall
If the target was an extension function or property, this is the value for its receiver parameter

Specified by:
getExtensionReceiver in interface ResolvedCall<D extends CallableDescriptor>

getDispatchReceiver

@Nullable
public ReceiverValue getDispatchReceiver()
Description copied from interface: ResolvedCall
If the target was a member of a class, this is the object of that class to call it on

Specified by:
getDispatchReceiver in interface ResolvedCall<D extends CallableDescriptor>

getExplicitReceiverKind

@NotNull
public ExplicitReceiverKind getExplicitReceiverKind()
Description copied from interface: ResolvedCall
Determines whether receiver argument or this object is substituted for explicit receiver

Specified by:
getExplicitReceiverKind in interface ResolvedCall<D extends CallableDescriptor>

getValueArguments

@NotNull
public java.util.Map<ValueParameterDescriptor,ResolvedValueArgument> getValueArguments()
Description copied from interface: ResolvedCall
Values (arguments) for value parameters

Specified by:
getValueArguments in interface ResolvedCall<D extends CallableDescriptor>

getValueArgumentsByIndex

@Nullable
public java.util.List<ResolvedValueArgument> getValueArgumentsByIndex()
Description copied from interface: ResolvedCall
Values (arguments) for value parameters indexed by parameter index

Specified by:
getValueArgumentsByIndex in interface ResolvedCall<D extends CallableDescriptor>

recordArgumentMatchStatus

public void recordArgumentMatchStatus(@NotNull
                                      ValueArgument valueArgument,
                                      @NotNull
                                      ArgumentMatchStatus matchStatus)
Specified by:
recordArgumentMatchStatus in interface MutableResolvedCall<D extends CallableDescriptor>

getArgumentMapping

@NotNull
public ArgumentMapping getArgumentMapping(@NotNull
                                                  ValueArgument valueArgument)
Description copied from interface: ResolvedCall
The result of mapping the value argument to a parameter

Specified by:
getArgumentMapping in interface ResolvedCall<D extends CallableDescriptor>

getTypeArguments

@NotNull
public java.util.Map<TypeParameterDescriptor,KotlinType> getTypeArguments()
Description copied from interface: ResolvedCall
What's substituted for type parameters

Specified by:
getTypeArguments in interface ResolvedCall<D extends CallableDescriptor>

isSafeCall

public boolean isSafeCall()
Specified by:
isSafeCall in interface ResolvedCall<D extends CallableDescriptor>

getDataFlowInfoForArguments

@NotNull
public MutableDataFlowInfoForArguments getDataFlowInfoForArguments()
Description copied from interface: ResolvedCall
Data flow info for each argument and the result data flow info

Specified by:
getDataFlowInfoForArguments in interface MutableResolvedCall<D extends CallableDescriptor>
Specified by:
getDataFlowInfoForArguments in interface ResolvedCall<D extends CallableDescriptor>

hasInferredReturnType

public boolean hasInferredReturnType()
Specified by:
hasInferredReturnType in interface MutableResolvedCall<D extends CallableDescriptor>

markCallAsCompleted

public void markCallAsCompleted()
Specified by:
markCallAsCompleted in interface MutableResolvedCall<D extends CallableDescriptor>

isCompleted

public boolean isCompleted()
Specified by:
isCompleted in interface MutableResolvedCall<D extends CallableDescriptor>

getKnownTypeParametersSubstitutor

@Nullable
public TypeSubstitutor getKnownTypeParametersSubstitutor()
Specified by:
getKnownTypeParametersSubstitutor in interface MutableResolvedCall<D extends CallableDescriptor>

setSmartCastDispatchReceiverType

public void setSmartCastDispatchReceiverType(@NotNull
                                             KotlinType smartCastDispatchReceiverType)
Specified by:
setSmartCastDispatchReceiverType in interface MutableResolvedCall<D extends CallableDescriptor>

getSmartCastDispatchReceiverType

@Nullable
public KotlinType getSmartCastDispatchReceiverType()
Specified by:
getSmartCastDispatchReceiverType in interface ResolvedCall<D extends CallableDescriptor>