org.jetbrains.kotlin.resolve.calls.smartcasts
Class SmartCastManager
java.lang.Object
org.jetbrains.kotlin.resolve.calls.smartcasts.SmartCastManager
public class SmartCastManager
- extends java.lang.Object
Method Summary |
static SmartCastResult |
checkAndRecordPossibleCast(DataFlowValue dataFlowValue,
KotlinType expectedType,
KtExpression expression,
ResolutionContext c,
KtExpression calleeExpression,
boolean recordExpressionType)
|
java.util.List<KotlinType> |
getSmartCastVariants(ReceiverValue receiverToCast,
BindingContext bindingContext,
DeclarationDescriptor containingDeclarationOrModule,
DataFlowInfo dataFlowInfo)
|
java.util.List<KotlinType> |
getSmartCastVariants(ReceiverValue receiverToCast,
ResolutionContext context)
|
java.util.Collection<KotlinType> |
getSmartCastVariantsExcludingReceiver(BindingContext bindingContext,
DeclarationDescriptor containingDeclarationOrModule,
DataFlowInfo dataFlowInfo,
ReceiverValue receiverToCast)
|
java.util.Collection<KotlinType> |
getSmartCastVariantsExcludingReceiver(ResolutionContext context,
ReceiverValue receiverToCast)
|
java.util.List<KotlinType> |
getSmartCastVariantsWithLessSpecificExcluded(ReceiverValue receiverToCast,
BindingContext bindingContext,
DeclarationDescriptor containingDeclarationOrModule,
DataFlowInfo dataFlowInfo)
|
boolean |
isSubTypeBySmartCastIgnoringNullability(ReceiverValue receiverArgument,
KotlinType receiverParameterType,
ResolutionContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SmartCastManager
public SmartCastManager()
getSmartCastVariants
@NotNull
public java.util.List<KotlinType> getSmartCastVariants(@NotNull
ReceiverValue receiverToCast,
@NotNull
ResolutionContext context)
getSmartCastVariants
@NotNull
public java.util.List<KotlinType> getSmartCastVariants(@NotNull
ReceiverValue receiverToCast,
@NotNull
BindingContext bindingContext,
@NotNull
DeclarationDescriptor containingDeclarationOrModule,
@NotNull
DataFlowInfo dataFlowInfo)
getSmartCastVariantsWithLessSpecificExcluded
@NotNull
public java.util.List<KotlinType> getSmartCastVariantsWithLessSpecificExcluded(@NotNull
ReceiverValue receiverToCast,
@NotNull
BindingContext bindingContext,
@NotNull
DeclarationDescriptor containingDeclarationOrModule,
@NotNull
DataFlowInfo dataFlowInfo)
getSmartCastVariantsExcludingReceiver
@NotNull
public java.util.Collection<KotlinType> 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<KotlinType> 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
KotlinType receiverParameterType,
@NotNull
ResolutionContext context)
checkAndRecordPossibleCast
@Nullable
public static SmartCastResult checkAndRecordPossibleCast(@NotNull
DataFlowValue dataFlowValue,
@NotNull
KotlinType expectedType,
@Nullable
KtExpression expression,
@NotNull
ResolutionContext c,
@Nullable
KtExpression calleeExpression,
boolean recordExpressionType)