public class ClosureWithExpectationHelper extends AbstractClosureTypeHelper
ClosureWithoutExpectationHelper| Modifier | Constructor and Description |
|---|---|
protected |
ClosureWithExpectationHelper(XClosure closure,
org.eclipse.xtext.common.types.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.
|
org.eclipse.xtext.common.types.JvmOperation |
getOperation()
This method is only public for testing purpose.
|
java.util.List<org.eclipse.xtext.common.types.JvmFormalParameter> |
getParameters()
Returns the effective list of parameters.
|
protected FunctionTypeReference |
initKnownClosureType(org.eclipse.xtext.common.types.JvmType type,
org.eclipse.xtext.common.types.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, validateprotected ClosureWithExpectationHelper(XClosure closure, org.eclipse.xtext.common.types.JvmOperation operation, ITypeExpectation expectation, ITypeComputationState state)
public org.eclipse.xtext.common.types.JvmOperation getOperation()
AbstractClosureTypeHelpergetOperation in class AbstractClosureTypeHelperpublic FunctionTypeReference getExpectedClosureType()
AbstractClosureTypeHelpergetExpectedClosureType in class AbstractClosureTypeHelperprotected void computeTypes()
computeTypes in class AbstractClosureTypeHelperprotected 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(org.eclipse.xtext.common.types.JvmType type, org.eclipse.xtext.common.types.JvmOperation operation)
protected ITypeComputationState getClosureBodyTypeComputationState(ITypeAssigner typeAssigner)
public java.util.List<org.eclipse.xtext.common.types.JvmFormalParameter> getParameters()
IClosureCandidategetParameters in interface IClosureCandidategetParameters in class AbstractClosureTypeHelperprotected ITypeComputationState assignParameters(ITypeAssigner typeAssigner)
protected int processExpressionType(ITypeComputationResult expressionResult)
protected boolean isImplicitReturn(ITypeComputationResult expressionResult)