@NonNullByDefault public class ClosureWithExpectationHelper extends AbstractClosureTypeHelper
ClosureWithoutExpectationHelper
Modifier | Constructor and Description |
---|---|
protected |
ClosureWithExpectationHelper(XClosure closure,
JvmOperation operation,
ITypeExpectation expectation,
ITypeComputationState state) |
Modifier and Type | Method and Description |
---|---|
protected void |
computeTypes() |
protected ITypeComputationState |
getClosureBodyTypeComputationState(ITypeAssigner typeAssigner) |
FunctionTypeReference |
getExpectedClosureType()
This method is only public for testing purpose.
|
JvmOperation |
getOperation()
This method is only public for testing purpose.
|
protected FunctionTypeReference |
initKnownClosureType(JvmType type,
JvmOperation operation) |
protected void |
prepareComputation() |
protected void |
prepareResultType() |
protected boolean |
processExpressionType(ITypeComputationResult expressionResult)
Returns
true if the expression result is definitely incompatible to the expected type. |
deferredBindTypeArgument, getClosure, getExpectation, getServices, getState
protected ClosureWithExpectationHelper(XClosure closure, JvmOperation operation, ITypeExpectation expectation, ITypeComputationState state)
public JvmOperation getOperation()
AbstractClosureTypeHelper
getOperation
in class AbstractClosureTypeHelper
public FunctionTypeReference getExpectedClosureType()
AbstractClosureTypeHelper
getExpectedClosureType
in class AbstractClosureTypeHelper
protected void computeTypes()
computeTypes
in class AbstractClosureTypeHelper
protected void prepareComputation()
protected void prepareResultType()
protected FunctionTypeReference initKnownClosureType(JvmType type, JvmOperation operation)
protected ITypeComputationState getClosureBodyTypeComputationState(ITypeAssigner typeAssigner)
protected boolean processExpressionType(ITypeComputationResult expressionResult)
true
if the expression result is definitely incompatible to the expected type.