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 ITypeComputationState |
assignParameters(ITypeAssigner typeAssigner) |
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.
|
java.util.List<JvmFormalParameter> |
getParameters()
Returns the effective list of parameters.
|
protected FunctionTypeReference |
initKnownClosureType(JvmType type,
JvmOperation operation) |
protected boolean |
isImplicitReturn(ITypeComputationResult expressionResult) |
protected void |
markCompatibleParameterList() |
protected void |
markIncompatible() |
protected void |
markIncompatibleParameterList() |
protected void |
markRawCompatible() |
protected void |
markUncheckedValid() |
protected void |
markVoidCompatible() |
protected void |
prepareComputation() |
protected void |
prepareResultType() |
protected int |
processExpressionType(ITypeComputationResult expressionResult)
Returns an indicator how compatible the expression type result is to the expected type.
|
applyToModel, deferredBindTypeArgument, getClosure, getExpectation, getServices, getState, validate
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 markUncheckedValid()
protected void markIncompatibleParameterList()
protected void markCompatibleParameterList()
protected void markIncompatible()
protected void markRawCompatible()
protected void markVoidCompatible()
protected void prepareComputation()
protected void prepareResultType()
protected FunctionTypeReference initKnownClosureType(JvmType type, JvmOperation operation)
protected ITypeComputationState getClosureBodyTypeComputationState(ITypeAssigner typeAssigner)
public java.util.List<JvmFormalParameter> getParameters()
IClosureCandidate
getParameters
in interface IClosureCandidate
getParameters
in class AbstractClosureTypeHelper
protected ITypeComputationState assignParameters(ITypeAssigner typeAssigner)
protected int processExpressionType(ITypeComputationResult expressionResult)
protected boolean isImplicitReturn(ITypeComputationResult expressionResult)