org.jetbrains.kotlin.types.expressions
Class DataFlowAnalyzer

java.lang.Object
  extended by org.jetbrains.kotlin.types.expressions.DataFlowAnalyzer

public class DataFlowAnalyzer
extends java.lang.Object


Constructor Summary
DataFlowAnalyzer(java.lang.Iterable<AdditionalTypeChecker> additionalTypeCheckers, ConstantExpressionEvaluator constantExpressionEvaluator, KotlinBuiltIns builtIns, SmartCastManager smartCastManager, ExpressionTypingFacade facade)
           
 
Method Summary
static SmartCastResult checkPossibleCast(KotlinType expressionType, KtExpression expression, ResolutionContext c)
           
 KotlinType checkStatementType(KtExpression expression, ResolutionContext context)
           
 KotlinTypeInfo checkType(KotlinTypeInfo typeInfo, KtExpression expression, ResolutionContext context)
           
 KotlinType checkType(KotlinType expressionType, KtExpression expression, ResolutionContext context)
           
 KotlinType checkType(KotlinType expressionType, KtExpression expressionToCheck, ResolutionContext c, com.intellij.openapi.util.Ref<java.lang.Boolean> hasError)
           
 KotlinTypeInfo createCheckedTypeInfo(KotlinType type, ResolutionContext<?> context, KtExpression expression)
           
 KotlinTypeInfo createCompileTimeConstantTypeInfo( value, KtExpression expression, ExpressionTypingContext context)
           
 DataFlowInfo extractDataFlowInfoFromCondition(KtExpression condition, boolean conditionValue, ExpressionTypingContext context)
           
static java.util.Collection<KotlinType> getAllPossibleTypes(KtExpression expression, DataFlowInfo dataFlowInfo, KotlinType type, ResolutionContext c)
           
static KotlinTypeInfo illegalStatementType(KtExpression expression, ExpressionTypingContext context, org.jetbrains.kotlin.types.expressions.ExpressionTypingInternals facade)
           
 void recordExpectedType(BindingTrace trace, KtExpression expression, KotlinType expectedType)
           
static boolean typeHasEqualsFromAny(KotlinType type, KtElement lookupElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFlowAnalyzer

public DataFlowAnalyzer(@NotNull
                        java.lang.Iterable<AdditionalTypeChecker> additionalTypeCheckers,
                        @NotNull
                        ConstantExpressionEvaluator constantExpressionEvaluator,
                        @NotNull
                        KotlinBuiltIns builtIns,
                        @NotNull
                        SmartCastManager smartCastManager,
                        @NotNull
                        ExpressionTypingFacade facade)
Method Detail

typeHasEqualsFromAny

public static boolean typeHasEqualsFromAny(@NotNull
                                           KotlinType type,
                                           @NotNull
                                           KtElement lookupElement)

extractDataFlowInfoFromCondition

@NotNull
public DataFlowInfo extractDataFlowInfoFromCondition(@Nullable
                                                             KtExpression condition,
                                                             boolean conditionValue,
                                                             ExpressionTypingContext context)

checkType

@Nullable
public KotlinType checkType(@Nullable
                                     KotlinType expressionType,
                                     @NotNull
                                     KtExpression expression,
                                     @NotNull
                                     ResolutionContext context)

checkType

@NotNull
public KotlinTypeInfo checkType(@NotNull
                                        KotlinTypeInfo typeInfo,
                                        @NotNull
                                        KtExpression expression,
                                        @NotNull
                                        ResolutionContext context)

checkType

@Nullable
public KotlinType checkType(@Nullable
                                     KotlinType expressionType,
                                     @NotNull
                                     KtExpression expressionToCheck,
                                     @NotNull
                                     ResolutionContext c,
                                     @Nullable
                                     com.intellij.openapi.util.Ref<java.lang.Boolean> hasError)

checkPossibleCast

@Nullable
public static SmartCastResult checkPossibleCast(@NotNull
                                                         KotlinType expressionType,
                                                         @NotNull
                                                         KtExpression expression,
                                                         @NotNull
                                                         ResolutionContext c)

recordExpectedType

public void recordExpectedType(@NotNull
                               BindingTrace trace,
                               @NotNull
                               KtExpression expression,
                               @NotNull
                               KotlinType expectedType)

checkStatementType

@Nullable
public KotlinType checkStatementType(@NotNull
                                              KtExpression expression,
                                              @NotNull
                                              ResolutionContext context)

illegalStatementType

@NotNull
public static KotlinTypeInfo illegalStatementType(@NotNull
                                                          KtExpression expression,
                                                          @NotNull
                                                          ExpressionTypingContext context,
                                                          @NotNull
                                                          org.jetbrains.kotlin.types.expressions.ExpressionTypingInternals facade)

getAllPossibleTypes

@NotNull
public static java.util.Collection<KotlinType> getAllPossibleTypes(@NotNull
                                                                           KtExpression expression,
                                                                           @NotNull
                                                                           DataFlowInfo dataFlowInfo,
                                                                           @NotNull
                                                                           KotlinType type,
                                                                           @NotNull
                                                                           ResolutionContext c)

createCheckedTypeInfo

@NotNull
public KotlinTypeInfo createCheckedTypeInfo(@Nullable
                                                    KotlinType type,
                                                    @NotNull
                                                    ResolutionContext<?> context,
                                                    @NotNull
                                                    KtExpression expression)

createCompileTimeConstantTypeInfo

@NotNull
public KotlinTypeInfo createCompileTimeConstantTypeInfo(@NotNull
                                                                 value,
                                                                @NotNull
                                                                KtExpression expression,
                                                                @NotNull
                                                                ExpressionTypingContext context)