Class AbstractClosureTypeHelper
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.computation.AbstractClosureTypeHelper
-
- All Implemented Interfaces:
IApplicableCandidate,IClosureCandidate
- Direct Known Subclasses:
ClosureWithExpectationHelper,ClosureWithoutExpectationHelper,UnknownClosureTypeHelper
public abstract class AbstractClosureTypeHelper extends java.lang.Object implements IClosureCandidate
Base strategy to compute the type of lambda expressions.- Noextend:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractClosureTypeHelper(XClosure closure, ITypeExpectation expectation, ITypeComputationState state)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidapplyToModel(IResolvedTypes resolvedTypes)Injects the resolved information into the model.protected abstract voidcomputeTypes()protected voiddeferredBindTypeArgument(LightweightTypeReference declared, LightweightTypeReference actual, BoundTypeArgumentSource source)protected XClosuregetClosure()protected ITypeExpectationgetExpectation()abstract FunctionTypeReferencegetExpectedClosureType()This method is only public for testing purpose.abstract org.eclipse.xtext.common.types.JvmOperationgetOperation()This method is only public for testing purpose.abstract java.util.List<org.eclipse.xtext.common.types.JvmFormalParameter>getParameters()Returns the effective list of parameters.protected CommonTypeComputationServicesgetServices()protected ITypeComputationStategetState()booleanvalidate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)Produce diagnostics for this condidate.
-
-
-
Constructor Detail
-
AbstractClosureTypeHelper
protected AbstractClosureTypeHelper(XClosure closure, ITypeExpectation expectation, ITypeComputationState state)
-
-
Method Detail
-
getState
protected ITypeComputationState getState()
-
getExpectation
protected ITypeExpectation getExpectation()
-
getClosure
protected XClosure getClosure()
-
getServices
protected CommonTypeComputationServices getServices()
-
computeTypes
protected abstract void computeTypes()
- Noreference:
- This method is not intended to be referenced by clients.
-
getExpectedClosureType
public abstract FunctionTypeReference getExpectedClosureType()
This method is only public for testing purpose.- Noreference:
- This method is not intended to be referenced by clients.
-
getOperation
public abstract org.eclipse.xtext.common.types.JvmOperation getOperation()
This method is only public for testing purpose.- Noreference:
- This method is not intended to be referenced by clients.
-
deferredBindTypeArgument
protected void deferredBindTypeArgument(LightweightTypeReference declared, LightweightTypeReference actual, BoundTypeArgumentSource source)
-
applyToModel
public void applyToModel(IResolvedTypes resolvedTypes)
Description copied from interface:IApplicableCandidateInjects the resolved information into the model.- Specified by:
applyToModelin interfaceIApplicableCandidate
-
validate
public boolean validate(org.eclipse.xtext.util.IAcceptor<? super org.eclipse.xtext.diagnostics.AbstractDiagnostic> result)
Description copied from interface:IApplicableCandidateProduce diagnostics for this condidate. It is not the responsibility of this candidate to propagate the acceptor to its children.- Specified by:
validatein interfaceIApplicableCandidate- Returns:
trueif further validation should be performed.
-
getParameters
public abstract java.util.List<org.eclipse.xtext.common.types.JvmFormalParameter> getParameters()
Description copied from interface:IClosureCandidateReturns the effective list of parameters. This may either be the declared parameter list or the synthetic parameter list.- Specified by:
getParametersin interfaceIClosureCandidate
-
-