Skip to content

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>
)

Constructors

KaDataFlowExitPointSnapshot

constructor(
    defaultExpressionInfo: KaDataFlowExitPointSnapshot.DefaultExpressionInfo?, 
    valuedReturnExpressions: List<KtExpression>, 
    returnValueType: KaType?, 
    jumpExpressions: List<KtExpression>, 
    hasJumps: Boolean, 
    hasEscapingJumps: Boolean, 
    hasMultipleJumpKinds: Boolean, 
    hasMultipleJumpTargets: Boolean, 
    variableReassignments: List<KaDataFlowExitPointSnapshot.VariableReassignment>
)

Types

DefaultExpressionInfo

class DefaultExpressionInfo(val expression: KtExpression, val type: KaType)

Represents a default expression (generally, a last given statement if it has a meaningful result type). Expressions that always return Nothing, such as return, break, continue or throw, cannot be default expressions.

VariableReassignment

class VariableReassignment(
    val expression: KtExpression, 
    val variable: KaVariableSymbol, 
    val isAugmented: Boolean
)

Represents a local variable reassignment.

Properties

defaultExpressionInfo

A default expression, if any.

See also

hasEscapingJumps

true if next-executed instructions for the potential default expression and jump expressions are different.

hasJumps

true if there are any control-flow statements that jump outside given statements. Jumps include both loop jumps (break and continue) and returns. Conditional blocks (if) and throws are not considered as jumps.

hasMultipleJumpKinds

true if there are jumps of different kinds (e.g., there is both a break and a return).

hasMultipleJumpTargets

true if two or more jumps have different next-executed instructions. Such as, there are both inner and outer loop break, or a break and continue for the same loop.

jumpExpressions

All jump expressions.

See also

  • hasJumps: for the definition of jumps.

returnValueType

A common supertype of values in valuedReturnExpressions.

valuedReturnExpressions

A list of expressions that return a value.

The expressions are not necessarily KtReturnExpressions. For instance, implicit return from a lambda can be an arbitrary expression.

variableReassignments

local variable reassignments found in given statements.