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
 CallChecker callChecker
           
 boolean collectAllCandidates
           
 ContextDependency contextDependency
           
 DataFlowInfo dataFlowInfo
           
 JetType expectedType
           
 boolean insideCallChain
           
 boolean isAnnotationContext
           
 ResolutionResultsCache resolutionResultsCache
           
 LexicalScope scope
           
 StatementFilter statementFilter
           
 BindingTrace trace
           
 
Constructor Summary
protected ResolutionContext(BindingTrace trace, LexicalScope scope, JetType expectedType, DataFlowInfo dataFlowInfo, ContextDependency contextDependency, ResolutionResultsCache resolutionResultsCache, CallChecker callChecker, StatementFilter statementFilter, boolean isAnnotationContext, boolean collectAllCandidates, boolean insideCallChain)
           
 
Method Summary
protected abstract  Context create(BindingTrace trace, LexicalScope scope, DataFlowInfo dataFlowInfo, JetType expectedType, ContextDependency contextDependency, ResolutionResultsCache resolutionResultsCache, StatementFilter statementFilter, boolean collectAllCandidates, boolean insideSafeCallChain)
           
 Context replaceBindingTrace(BindingTrace trace)
           
 Context replaceCollectAllCandidates(boolean newCollectAllCandidates)
           
 Context replaceContextDependency(ContextDependency newContextDependency)
           
 Context replaceDataFlowInfo(DataFlowInfo newDataFlowInfo)
           
 Context replaceExpectedType(JetType newExpectedType)
           
 Context replaceInsideCallChain(boolean insideSafeCallChain)
           
 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 JetType expectedType

dataFlowInfo

@NotNull
public final DataFlowInfo dataFlowInfo

contextDependency

@NotNull
public final ContextDependency contextDependency

resolutionResultsCache

@NotNull
public final ResolutionResultsCache resolutionResultsCache

callChecker

@NotNull
public final CallChecker callChecker

statementFilter

@NotNull
public final StatementFilter statementFilter

isAnnotationContext

public final boolean isAnnotationContext

collectAllCandidates

public final boolean collectAllCandidates

insideCallChain

public final boolean insideCallChain
Constructor Detail

ResolutionContext

protected ResolutionContext(@NotNull
                            BindingTrace trace,
                            @NotNull
                            LexicalScope scope,
                            @NotNull
                            JetType expectedType,
                            @NotNull
                            DataFlowInfo dataFlowInfo,
                            @NotNull
                            ContextDependency contextDependency,
                            @NotNull
                            ResolutionResultsCache resolutionResultsCache,
                            @NotNull
                            CallChecker callChecker,
                            @NotNull
                            StatementFilter statementFilter,
                            boolean isAnnotationContext,
                            boolean collectAllCandidates,
                            boolean insideCallChain)
Method Detail

create

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

replaceBindingTrace

@NotNull
public Context replaceBindingTrace(@NotNull
                                           BindingTrace trace)

replaceDataFlowInfo

@NotNull
public Context replaceDataFlowInfo(@NotNull
                                           DataFlowInfo newDataFlowInfo)

replaceExpectedType

@NotNull
public Context replaceExpectedType(@Nullable
                                           JetType 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)

replaceInsideCallChain

@NotNull
public Context replaceInsideCallChain(boolean insideSafeCallChain)