org.eclipse.xtext.xbase.typesystem.computation
Interface ITypeComputationState.Fork

All Known Implementing Classes:
AbstractLogicalContainerAwareRootComputationState, AbstractRootTypeComputationState, AbstractStackedTypeComputationState, AbstractTypeComputationState, ChildExpressionTypeCheckpointComputationState, ChildExpressionTypeComputationState, ConstructorBodyComputationState, ExpressionTypeCheckpointComputationState, ExpressionTypeComputationState, FieldTypeComputationState, NoExpectationTypeComputationState, ObservableTypeComputationStateWithExpectation, OperationBodyComputationState, ReturnExpectationTypeComputationState, RootExpressionComputationState, TypeCheckpointComputationState, TypeComputationStateWithExpectation, TypeComputationStateWithNonVoidExpectation
Enclosing interface:
ITypeComputationState

public static interface ITypeComputationState.Fork


Method Summary
 ITypeComputationState withExpectation(JvmTypeReference expectation)
          The given expectation will be resolved if it contains unresolved type arguments, e.g.
 ITypeComputationState withNonVoidExpectation()
           
 ITypeComputationState withoutExpectation()
          Discards the current expectation and allows to use return and throw independently from the parent's state.
 ITypeComputationState withoutImmediateExpectation()
          Keeps the return type expectation.
 ITypeComputationState withReturnExpectation()
          Transfers the available return type expectation to the immediate expectation of this computation step.
 ITypeComputationState withTypeCheckpoint()
           
 

Method Detail

withExpectation

ITypeComputationState withExpectation(JvmTypeReference expectation)
The given expectation will be resolved if it contains unresolved type arguments, e.g. an operation that declares two parameters of the very same type argument will yield a more detailed expectation if possible. <T> T foo(T, T) with foo<String>(null, 'string') will allow to pass the unresolved T as expectation where clients would be invoked with the better candidate 'string'.


withNonVoidExpectation

ITypeComputationState withNonVoidExpectation()

withoutExpectation

ITypeComputationState withoutExpectation()
Discards the current expectation and allows to use return and throw independently from the parent's state.


withReturnExpectation

ITypeComputationState withReturnExpectation()
Transfers the available return type expectation to the immediate expectation of this computation step.


withoutImmediateExpectation

ITypeComputationState withoutImmediateExpectation()
Keeps the return type expectation. Otherwise the state is free of expectations.


withTypeCheckpoint

ITypeComputationState withTypeCheckpoint()