org.jetbrains.kotlin.analysis.api.dataflow¶
Types¶
KaDataFlowExitPointSnapshot¶
class KaDataFlowExitPointSnapshot(
val defaultExpressionInfo: KaDataFlowExitPointSnapshot.DefaultExpressionInfo?,
val valuedReturnExpressions: List<KtExpression>,
val returnValueType: KaType?,
val jumpExpressions: List<KtExpression>,
val hasJumps: Boolean,
val hasEscapingJumps: Boolean,
val hasMultipleJumpKinds: Boolean,
val hasMultipleJumpTargets: Boolean,
val variableReassignments: List<KaDataFlowExitPointSnapshot.VariableReassignment>
)
KaImplicitReceiverSmartCast¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaImplicitReceiverSmartCast : KaLifetimeOwner
Represents type information about an implicit receiver which has been smart-cast to a more specific type. An implicit smart cast is applied to an implicit receiver, such as substring() called on an implicit this given an earlier smart cast this is String.
KaImplicitReceiverSmartCastKind¶
Represents the kind of implicit receiver affected by the smart cast.
KaSmartCastInfo¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaSmartCastInfo : KaLifetimeOwner
Represents smart cast information for an expression.
Properties¶
implicitReceiverSmartCasts¶
context(session: KaSession)
val KtExpression.implicitReceiverSmartCasts: Collection<KaImplicitReceiverSmartCast>
The list of implicit receiver smart casts which have refined the expression's implicit receivers to a more specific type. These smart casts are required for the expression to be evaluated. The list does not include smart casts for explicit receivers.
smartCastInfo¶
context(session: KaSession)
val KtExpression.smartCastInfo: KaSmartCastInfo?
Smart cast information for the given KtExpression, or null if smart casts are not applied to it.
Functions¶
computeExitPointSnapshot¶
context(session: KaSession)
fun computeExitPointSnapshot(statements: List<KtExpression>): KaDataFlowExitPointSnapshot