org.jetbrains.kotlin.resolve.calls.smartcasts
Class SmartCastManager

java.lang.Object
  extended by org.jetbrains.kotlin.resolve.calls.smartcasts.SmartCastManager

public class SmartCastManager
extends java.lang.Object


Constructor Summary
SmartCastManager()
           
 
Method Summary
 SmartCastResult checkAndRecordPossibleCast(DataFlowValue dataFlowValue, JetType expectedType, JetExpression expression, ResolutionContext c, boolean recordExpressionType)
           
 java.util.List<JetType> getSmartCastVariants(ReceiverValue receiverToCast, BindingContext bindingContext, DeclarationDescriptor containingDeclarationOrModule, DataFlowInfo dataFlowInfo)
           
 java.util.List<JetType> getSmartCastVariants(ReceiverValue receiverToCast, ResolutionContext context)
           
 java.util.Collection<JetType> getSmartCastVariantsExcludingReceiver(BindingContext bindingContext, DeclarationDescriptor containingDeclarationOrModule, DataFlowInfo dataFlowInfo, ReceiverValue receiverToCast)
           
 java.util.Collection<JetType> getSmartCastVariantsExcludingReceiver(ResolutionContext context, ReceiverValue receiverToCast)
           
 java.util.List<JetType> getSmartCastVariantsWithLessSpecificExcluded(ReceiverValue receiverToCast, BindingContext bindingContext, DeclarationDescriptor containingDeclarationOrModule, DataFlowInfo dataFlowInfo)
           
 boolean isSubTypeBySmartCastIgnoringNullability(ReceiverValue receiverArgument, JetType receiverParameterType, ResolutionContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmartCastManager

public SmartCastManager()
Method Detail

getSmartCastVariants

@NotNull
public java.util.List<JetType> getSmartCastVariants(@NotNull
                                                            ReceiverValue receiverToCast,
                                                            @NotNull
                                                            ResolutionContext context)

getSmartCastVariants

@NotNull
public java.util.List<JetType> getSmartCastVariants(@NotNull
                                                            ReceiverValue receiverToCast,
                                                            @NotNull
                                                            BindingContext bindingContext,
                                                            @NotNull
                                                            DeclarationDescriptor containingDeclarationOrModule,
                                                            @NotNull
                                                            DataFlowInfo dataFlowInfo)

getSmartCastVariantsWithLessSpecificExcluded

@NotNull
public java.util.List<JetType> getSmartCastVariantsWithLessSpecificExcluded(@NotNull
                                                                                    ReceiverValue receiverToCast,
                                                                                    @NotNull
                                                                                    BindingContext bindingContext,
                                                                                    @NotNull
                                                                                    DeclarationDescriptor containingDeclarationOrModule,
                                                                                    @NotNull
                                                                                    DataFlowInfo dataFlowInfo)

getSmartCastVariantsExcludingReceiver

@NotNull
public java.util.Collection<JetType> getSmartCastVariantsExcludingReceiver(@NotNull
                                                                                   ResolutionContext context,
                                                                                   @NotNull
                                                                                   ReceiverValue receiverToCast)
Returns:
variants @param receiverToCast may be cast to according to context dataFlowInfo, receiverToCast itself is NOT included

getSmartCastVariantsExcludingReceiver

@NotNull
public java.util.Collection<JetType> getSmartCastVariantsExcludingReceiver(@NotNull
                                                                                   BindingContext bindingContext,
                                                                                   @NotNull
                                                                                   DeclarationDescriptor containingDeclarationOrModule,
                                                                                   @NotNull
                                                                                   DataFlowInfo dataFlowInfo,
                                                                                   @NotNull
                                                                                   ReceiverValue receiverToCast)
Returns:
variants @param receiverToCast may be cast to according to @param dataFlowInfo, @param receiverToCast itself is NOT included

isSubTypeBySmartCastIgnoringNullability

public boolean isSubTypeBySmartCastIgnoringNullability(@NotNull
                                                       ReceiverValue receiverArgument,
                                                       @NotNull
                                                       JetType receiverParameterType,
                                                       @NotNull
                                                       ResolutionContext context)

checkAndRecordPossibleCast

@Nullable
public SmartCastResult checkAndRecordPossibleCast(@NotNull
                                                           DataFlowValue dataFlowValue,
                                                           @NotNull
                                                           JetType expectedType,
                                                           @Nullable
                                                           JetExpression expression,
                                                           @NotNull
                                                           ResolutionContext c,
                                                           boolean recordExpressionType)