Javadoc
The all-instantiated type state is defined as the maximum state that is allowed. If our type was
just discovered as instantiated, it is not yet part of the "all instantiated" flow (so that
updates to the all-instantiated flow can be batched together).
Therefore, the type state of this source is "empty" until the "all instantiated" type state gets
updated. We discover that by registering ourself as an observer of the all-instantiated type
flow, and de-registering ourselves as soon as we change our type from "empty" to the actual exact
type.
To temporarily suspend updates containing the type that is not in all-instantiated yet we save
the state in a temporary, sourceState, which is copied in the type state of the source flow when
all-instantiated is updated.
After the source state type is added to the all-instantiated state this.state and
this.sourceState point to the same state object (due to TypeState.addState() union operation
special case optimization).
If the type is really never instantiated, i.e., AnalysisType.isInstantiated() is still false at
the end of the static analysis, then the rewrite never happens. That is correct, because in this
case that type can never be returned by this flow (and the only possible value is null, which is
set regardless of the type update).