public class ExpressionTypeComputationState extends AbstractStackedTypeComputationState
| Modifier and Type | Class and Description |
|---|---|
protected class |
ExpressionTypeComputationState.ExpressionAwareTypeCheckpointComputationState |
| Modifier and Type | Field and Description |
|---|---|
protected XExpression |
expression |
resolvedTypes| Modifier | Constructor and Description |
|---|---|
protected |
ExpressionTypeComputationState(StackedResolvedTypes resolvedTypes,
IFeatureScopeSession featureScopeSession,
AbstractTypeComputationState parent,
XExpression expression) |
| Modifier and Type | Method and Description |
|---|---|
protected LightweightTypeReference |
acceptType(ResolvedTypes resolvedTypes,
AbstractTypeExpectation expectation,
LightweightTypeReference type,
boolean returnType,
int flags) |
protected LightweightTypeReference |
acceptType(XExpression expression,
ResolvedTypes resolvedTypes,
AbstractTypeExpectation expectation,
LightweightTypeReference type,
boolean returnType,
int flags) |
protected IFeatureLinkingCandidate |
createResolvedLink(XAbstractFeatureCall featureCall,
org.eclipse.xtext.common.types.JvmIdentifiableElement resolvedTo) |
protected ExpressionAwareStackedResolvedTypes |
doComputeTypes(XExpression expression) |
protected StackedResolvedTypes |
getStackedResolvedTypes() |
protected boolean |
isImplicitFirstArgument(XAbstractFeatureCall featureCall) |
protected boolean |
isImplicitReceiver(XAbstractFeatureCall featureCall) |
protected boolean |
isInstanceContext() |
protected void |
markAsPropagated() |
protected void |
markAsRefinedTypeIfNecessary(IFeatureLinkingCandidate candidate) |
protected ExpressionAwareStackedResolvedTypes |
pushTypes(XExpression expression) |
TypeComputationStateWithExpectation |
withExpectation(LightweightTypeReference expectation)
The given expectation will be resolved if it contains unresolved type
arguments, e.g.
|
AbstractTypeComputationState |
withoutExpectation()
Keeps the return type expectation.
|
TypeCheckpointComputationState |
withTypeCheckpoint(org.eclipse.emf.ecore.EObject context)
A type checkpoint allows to re-specify the type of an identifiable that was already
type-computed.
|
getExpectations, getParent, getReturnExpectationsacceptActualType, acceptActualType, acceptActualType, acceptActualType, acceptCandidate, addDiagnostic, addExtensionsToCurrentScope, addExtensionToCurrentScope, addImports, addLocalToCurrentScope, addLocalToCurrentScope, addTypeToStaticExtensionImportScope, addTypeToStaticImportScope, afterScope, assignType, assignType, assignType, assignTypes, computeTypes, createCandidate, createCandidate, createCandidateWithReceiverType, createExpressionComputationState, createResolvedLink, createTypeAssigner, createUnboundTypeReference, discardReassignedTypes, getExpectations, getExpectedExceptions, getFeatureScopeSession, getLinkingCandidates, getLinkingCandidates, getReferenceOwner, getResolvedTypes, getResolver, getReturnExpectations, getSeverities, getSeverity, getSingleExpectation, getTypeComputer, getTypeReferences, isIgnored, reassignType, refineExpectedType, rewriteScope, toIdentifiableDescription, toString, withExpectedExceptions, withinScope, withNonVoidExpectation, withNonVoidExpectation, withoutRootExpectation, withReturnExpectation, withRootExpectationprotected final XExpression expression
protected ExpressionTypeComputationState(StackedResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession, AbstractTypeComputationState parent, XExpression expression)
protected ExpressionAwareStackedResolvedTypes doComputeTypes(XExpression expression)
doComputeTypes in class AbstractTypeComputationStateprotected void markAsPropagated()
protected void markAsRefinedTypeIfNecessary(IFeatureLinkingCandidate candidate)
protected ExpressionAwareStackedResolvedTypes pushTypes(XExpression expression)
pushTypes in class AbstractTypeComputationStateprotected LightweightTypeReference acceptType(ResolvedTypes resolvedTypes, AbstractTypeExpectation expectation, LightweightTypeReference type, boolean returnType, int flags)
acceptType in class AbstractStackedTypeComputationStateprotected LightweightTypeReference acceptType(XExpression expression, ResolvedTypes resolvedTypes, AbstractTypeExpectation expectation, LightweightTypeReference type, boolean returnType, int flags)
acceptType in class AbstractStackedTypeComputationStatepublic TypeComputationStateWithExpectation withExpectation(LightweightTypeReference expectation)
ITypeComputationState<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'.withExpectation in interface ITypeComputationStatewithExpectation in class AbstractTypeComputationStatepublic AbstractTypeComputationState withoutExpectation()
ITypeComputationState
{
someExpression
subsequent
}
The expectation for the call to someExpression does not have any actual expectations.withoutExpectation in interface ITypeComputationStatewithoutExpectation in class AbstractTypeComputationStatepublic TypeCheckpointComputationState withTypeCheckpoint(org.eclipse.emf.ecore.EObject context)
ITypeComputationStatewithTypeCheckpoint in interface ITypeComputationStatewithTypeCheckpoint in class AbstractTypeComputationStatecontext - an indicator that describes the context of this type checkpoint, e.g. an XCasePart.protected IFeatureLinkingCandidate createResolvedLink(XAbstractFeatureCall featureCall, org.eclipse.xtext.common.types.JvmIdentifiableElement resolvedTo)
createResolvedLink in class AbstractTypeComputationStateprotected boolean isImplicitReceiver(XAbstractFeatureCall featureCall)
protected boolean isImplicitFirstArgument(XAbstractFeatureCall featureCall)
protected boolean isInstanceContext()
protected StackedResolvedTypes getStackedResolvedTypes()