Class Assignable::AssignableDefinition

An assignable definition.

Either a direct non-tuple assignment (AssignableDefinitions::AssignmentDefinition), a direct tuple assignment (AssignableDefinitions::TupleAssignmentDefinition), an indirect out/ref assignment (AssignableDefinitions::OutRefDefinition), a mutation update (AssignableDefinitions::MutationDefinition), a local variable declaration without an initializer (AssignableDefinitions::LocalVariableDefinition), an implicit parameter definition (AssignableDefinitions::ImplicitParameterDefinition), an address-of definition (AssignableDefinitions::AddressOfDefinition), an is pattern definition (AssignableDefinitions::IsPatternDefinition), or a type case pattern definition (AssignableDefinitions::TypeCasePatternDefinition).

Direct supertypes

Known direct subtypes

Predicates

getAControlFlowNode

Gets a control flow node that updates the targeted assignable when reached.

getAFirstRead

Gets a first read of the same underlying assignable. That is, a read that can be reached from this definition without passing through any other reads, and which is guaranteed to read the value assigned in this definition. Example:

getAFirstUncertainRead

Gets a first uncertain read of the same underlying assignable. That is, a read that can be reached from this definition without passing through any other reads, and which may read the value assigned in this definition. Example:

getAReachableRead

Gets a reachable read of the same underlying assignable. That is, a read that can be reached from this definition, and which is guaranteed to read the value assigned in this definition.

getAReachableUncertainRead

Gets a reachable uncertain read of the same underlying assignable. That is, a read that can be reached from this definition, and which may read the value assigned in this definition.

getControlFlowNode

DEPRECATED: Use getAControlFlowNode() instead.

getEnclosingCallable

Gets the enclosing callable of this definition.

getExpr

Gets the underlying expression that updates the targeted assignable when reached, if any.

getLocation

Gets the location of this assignable definition.

getSource

Gets the assigned expression, if any. For example, the expression assigned in x = 0 is 0. The value may not always exists, for example in assignments via out/ref parameters.

getTarget

Gets the assignable being defined.

getTargetAccess

Gets the access used in the definition of the underlying assignable, if any. Local variable declarations and implicit parameter definitions are the only definitions without associated accesses.

isCertain

Holds if this definition is guaranteed to update the targeted assignable. The only potentially uncertain definitions are ref assignments.

toString

Gets a textual representation of this assignable definition.