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

java.lang.Object
  extended by org.jetbrains.jet.lang.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
           
 
Method Summary
 void addStatus(ResolutionStatus status)
           
 void addUnmappedArguments(java.util.Collection<? extends ValueArgument> unmappedArguments)
           
 void argumentHasNoType()
           
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
 ExplicitReceiverKind getExplicitReceiverKind()
          Determines whether receiver argument or this object is substituted for explicit receiver
 ReceiverValue getReceiverArgument()
          If the target was an extension function or property, this is the value for its receiver parameter
 D getResultingDescriptor()
          Type arguments are substituted.
 ResolutionStatus getStatus()
           
 ReceiverValue getThisObject()
          If the target was a member of a class, this is the object of that class to call it on
 DelegatingBindingTrace getTrace()
           
 TracingStrategy getTracing()
           
 java.util.Map<TypeParameterDescriptor,JetType> getTypeArguments()
          What's substituted for type parameters
 java.util.Set<ValueArgument> getUnmappedArguments()
           
 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 hasIncompleteTypeParameters()
          Resolved call can have incomplete type parameters if ResolutionStatus is INCOMPLETE_TYPE_INFERENCE (might be completed successfully) or OTHER_ERROR (cannot be completed successfully, but if there's only one candidate, should be completed anyway).
 boolean hasInferredReturnType()
           
 boolean isCompleted()
           
 boolean isDirty()
           
 boolean isSafeCall()
           
 void markCallAsCompleted()
           
 void recordArgumentMatch(ValueArgument valueArgument, ValueParameterDescriptor parameter, boolean hasTypeMismatch)
           
 void recordValueArgument(ValueParameterDescriptor valueParameter, ResolvedValueArgument valueArgument)
           
 void setConstraintSystem(ConstraintSystem constraintSystem)
           
 void setHasIncompleteTypeParameters(boolean hasIncompleteTypeParameters)
           
 void setInitialDataFlowInfo(DataFlowInfo info)
           
 void setResultingSubstitutor(TypeSubstitutor substitutor)
           
 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
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 MutableResolvedCall<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>

hasIncompleteTypeParameters

public boolean hasIncompleteTypeParameters()
Description copied from interface: MutableResolvedCall
Resolved call can have incomplete type parameters if ResolutionStatus is INCOMPLETE_TYPE_INFERENCE (might be completed successfully) or OTHER_ERROR (cannot be completed successfully, but if there's only one candidate, should be completed anyway).

Specified by:
hasIncompleteTypeParameters in interface MutableResolvedCall<D extends CallableDescriptor>
Returns:
true if resolved call has unknown type parameters (inference is incomplete)

setHasIncompleteTypeParameters

public void setHasIncompleteTypeParameters(boolean hasIncompleteTypeParameters)
Specified by:
setHasIncompleteTypeParameters in interface MutableResolvedCall<D extends CallableDescriptor>

getTrace

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

getTracing

@NotNull
public TracingStrategy getTracing()

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>

addUnmappedArguments

public void addUnmappedArguments(@NotNull
                                 java.util.Collection<? extends ValueArgument> unmappedArguments)
Specified by:
addUnmappedArguments in interface MutableResolvedCall<D extends CallableDescriptor>

getUnmappedArguments

@NotNull
public java.util.Set<ValueArgument> getUnmappedArguments()
Specified by:
getUnmappedArguments in interface MutableResolvedCall<D extends CallableDescriptor>

getReceiverArgument

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

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

getThisObject

@NotNull
public ReceiverValue getThisObject()
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:
getThisObject 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>

recordArgumentMatch

public void recordArgumentMatch(@NotNull
                                ValueArgument valueArgument,
                                @NotNull
                                ValueParameterDescriptor parameter,
                                boolean hasTypeMismatch)
Specified by:
recordArgumentMatch 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>

argumentHasNoType

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

isDirty

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

getTypeArguments

@NotNull
public java.util.Map<TypeParameterDescriptor,JetType> 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>

setInitialDataFlowInfo

public void setInitialDataFlowInfo(@NotNull
                                   DataFlowInfo info)
Specified by:
setInitialDataFlowInfo in interface MutableResolvedCall<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>