org.jetbrains.jet.lang.resolve.calls.autocasts
Class AutoCastUtils
java.lang.Object
org.jetbrains.jet.lang.resolve.calls.autocasts.AutoCastUtils
public class AutoCastUtils
- extends java.lang.Object
Method Summary |
static java.util.List<JetType> |
getAutoCastVariants(ReceiverValue receiverToCast,
BindingContext bindingContext,
DataFlowInfo dataFlowInfo)
|
static java.util.List<JetType> |
getAutoCastVariants(ReceiverValue receiverToCast,
ResolutionContext context)
|
static java.util.List<JetType> |
getAutoCastVariantsExcludingReceiver(BindingContext bindingContext,
DataFlowInfo dataFlowInfo,
ReceiverValue receiverToCast)
|
static boolean |
isNotNull(ReceiverValue receiver,
BindingContext bindingContext,
DataFlowInfo dataFlowInfo)
|
static boolean |
isSubTypeByAutoCastIgnoringNullability(ReceiverValue receiverArgument,
JetType receiverParameterType,
ResolutionContext context)
|
static boolean |
recordAutoCastIfNecessary(ReceiverValue receiver,
JetType receiverParameterType,
ResolutionContext context,
boolean safeAccess)
|
static void |
recordCastOrError(JetExpression expression,
JetType type,
BindingTrace trace,
boolean canBeCasted,
boolean recordExpressionType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getAutoCastVariants
public static java.util.List<JetType> getAutoCastVariants(@NotNull
ReceiverValue receiverToCast,
@NotNull
ResolutionContext context)
getAutoCastVariants
public static java.util.List<JetType> getAutoCastVariants(@NotNull
ReceiverValue receiverToCast,
@NotNull
BindingContext bindingContext,
@NotNull
DataFlowInfo dataFlowInfo)
getAutoCastVariantsExcludingReceiver
@NotNull
public static java.util.List<JetType> getAutoCastVariantsExcludingReceiver(@NotNull
BindingContext bindingContext,
@NotNull
DataFlowInfo dataFlowInfo,
@NotNull
ReceiverValue receiverToCast)
- Returns:
- variants @param receiverToCast may be cast to according to @param dataFlowInfo, @param receiverToCast itself is NOT included
isSubTypeByAutoCastIgnoringNullability
public static boolean isSubTypeByAutoCastIgnoringNullability(@NotNull
ReceiverValue receiverArgument,
@NotNull
JetType receiverParameterType,
@NotNull
ResolutionContext context)
recordAutoCastIfNecessary
public static boolean recordAutoCastIfNecessary(@NotNull
ReceiverValue receiver,
@NotNull
JetType receiverParameterType,
@NotNull
ResolutionContext context,
boolean safeAccess)
recordCastOrError
public static void recordCastOrError(@NotNull
JetExpression expression,
@NotNull
JetType type,
@NotNull
BindingTrace trace,
boolean canBeCasted,
boolean recordExpressionType)
isNotNull
public static boolean isNotNull(@NotNull
ReceiverValue receiver,
@NotNull
BindingContext bindingContext,
@NotNull
DataFlowInfo dataFlowInfo)