org.jetbrains.kotlin.resolve.calls.context
Class ResolutionContext<Context extends ResolutionContext<Context>>

java.lang.Object
  extended by org.jetbrains.kotlin.resolve.calls.context.ResolutionContext<Context>
Direct Known Subclasses:
CallResolutionContext, ExpressionTypingContext

public abstract class ResolutionContext<Context extends ResolutionContext<Context>>
extends java.lang.Object

This class together with its descendants is intended to transfer data flow analysis information in top-down direction, from AST parents to children. NB: all descendants must be immutable!


Field Summary
 CallPosition callPosition
           
 boolean collectAllCandidates
           
 ContextDependency contextDependency
           
 DataFlowInfo dataFlowInfo
           
 KotlinType expectedType
           
 boolean isAnnotationContext
           
 boolean isDebuggerContext
           
 ResolutionResultsCache resolutionResultsCache
           
 LexicalScope scope
           
 StatementFilter statementFilter
           
 BindingTrace trace
           
 
Constructor Summary
protected ResolutionContext(BindingTrace trace, LexicalScope scope, KotlinType expectedType, DataFlowInfo dataFlowInfo, ContextDependency contextDependency, ResolutionResultsCache resolutionResultsCache, StatementFilter statementFilter, boolean isAnnotationContext, boolean isDebuggerContext, boolean collectAllCandidates, CallPosition callPosition)
           
 
Method Summary
protected abstract  Context create(BindingTrace trace, LexicalScope scope, DataFlowInfo dataFlowInfo, KotlinType expectedType, ContextDependency contextDependency, ResolutionResultsCache resolutionResultsCache, StatementFilter statementFilter, boolean collectAllCandidates, CallPosition callPosition)
           
 Context replaceBindingTrace(BindingTrace trace)
           
 Context replaceCallPosition(CallPosition callPosition)
           
 Context replaceCollectAllCandidates(boolean newCollectAllCandidates)
           
 Context replaceContextDependency(ContextDependency newContextDependency)
           
 Context replaceDataFlowInfo(DataFlowInfo newDataFlowInfo)
           
 Context replaceExpectedType(KotlinType newExpectedType)
           
 Context replaceResolutionResultsCache(ResolutionResultsCache newResolutionResultsCache)
           
 Context replaceScope(LexicalScope newScope)
           
 Context replaceStatementFilter(StatementFilter statementFilter)
           
 Context replaceTraceAndCache(TemporaryTraceAndCache traceAndCache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trace

@NotNull
public final BindingTrace trace

scope

@NotNull
public final LexicalScope scope

expectedType

@NotNull
public final KotlinType expectedType

dataFlowInfo

@NotNull
public final DataFlowInfo dataFlowInfo

contextDependency

@NotNull
public final ContextDependency contextDependency

resolutionResultsCache

@NotNull
public final ResolutionResultsCache resolutionResultsCache

statementFilter

@NotNull
public final StatementFilter statementFilter

isAnnotationContext

public final boolean isAnnotationContext

isDebuggerContext

public final boolean isDebuggerContext

collectAllCandidates

public final boolean collectAllCandidates

callPosition

@NotNull
public final CallPosition callPosition
Constructor Detail

ResolutionContext

protected ResolutionContext(@NotNull
                            BindingTrace trace,
                            @NotNull
                            LexicalScope scope,
                            @NotNull
                            KotlinType expectedType,
                            @NotNull
                            DataFlowInfo dataFlowInfo,
                            @NotNull
                            ContextDependency contextDependency,
                            @NotNull
                            ResolutionResultsCache resolutionResultsCache,
                            @NotNull
                            StatementFilter statementFilter,
                            boolean isAnnotationContext,
                            boolean isDebuggerContext,
                            boolean collectAllCandidates,
                            @NotNull
                            CallPosition callPosition)
Method Detail

create

protected abstract Context create(@NotNull
                                  BindingTrace trace,
                                  @NotNull
                                  LexicalScope scope,
                                  @NotNull
                                  DataFlowInfo dataFlowInfo,
                                  @NotNull
                                  KotlinType expectedType,
                                  @NotNull
                                  ContextDependency contextDependency,
                                  @NotNull
                                  ResolutionResultsCache resolutionResultsCache,
                                  @NotNull
                                  StatementFilter statementFilter,
                                  boolean collectAllCandidates,
                                  @NotNull
                                  CallPosition callPosition)

replaceBindingTrace

@NotNull
public Context replaceBindingTrace(@NotNull
                                           BindingTrace trace)

replaceDataFlowInfo

@NotNull
public Context replaceDataFlowInfo(@NotNull
                                           DataFlowInfo newDataFlowInfo)

replaceExpectedType

@NotNull
public Context replaceExpectedType(@Nullable
                                           KotlinType newExpectedType)

replaceScope

@NotNull
public Context replaceScope(@NotNull
                                    LexicalScope newScope)

replaceContextDependency

@NotNull
public Context replaceContextDependency(@NotNull
                                                ContextDependency newContextDependency)

replaceResolutionResultsCache

@NotNull
public Context replaceResolutionResultsCache(@NotNull
                                                     ResolutionResultsCache newResolutionResultsCache)

replaceTraceAndCache

@NotNull
public Context replaceTraceAndCache(@NotNull
                                            TemporaryTraceAndCache traceAndCache)

replaceCollectAllCandidates

@NotNull
public Context replaceCollectAllCandidates(boolean newCollectAllCandidates)

replaceStatementFilter

@NotNull
public Context replaceStatementFilter(@NotNull
                                              StatementFilter statementFilter)

replaceCallPosition

@NotNull
public Context replaceCallPosition(@NotNull
                                           CallPosition callPosition)