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) |
getExpectations, getParent, getReturnExpectations
acceptActualType, acceptActualType, addDiagnostic, addExtensionsToCurrentScope, addExtensionToCurrentScope, addImports, addLocalToCurrentScope, addLocalToCurrentScope, addTypeToStaticExtensionImportScope, addTypeToStaticImportScope, afterScope, assignType, assignType, assignType, assignTypes, computeTypes, createCandidate, createCandidate, createCandidateWithReceiverType, createExpressionComputationState, createResolvedLink, createTypeAssigner, createUnboundTypeReference, discardReassignedTypes, getConverter, 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, withRootExpectation
protected final XExpression expression
protected ExpressionTypeComputationState(StackedResolvedTypes resolvedTypes, IFeatureScopeSession featureScopeSession, AbstractTypeComputationState parent, XExpression expression)
protected ExpressionAwareStackedResolvedTypes doComputeTypes(XExpression expression)
doComputeTypes
in class AbstractTypeComputationState
protected void markAsPropagated()
protected void markAsRefinedTypeIfNecessary(IFeatureLinkingCandidate candidate)
protected ExpressionAwareStackedResolvedTypes pushTypes(XExpression expression)
pushTypes
in class AbstractTypeComputationState
protected LightweightTypeReference acceptType(ResolvedTypes resolvedTypes, AbstractTypeExpectation expectation, LightweightTypeReference type, boolean returnType, ConformanceHint... hints)
acceptType
in class AbstractStackedTypeComputationState
protected LightweightTypeReference acceptType(XExpression expression, ResolvedTypes resolvedTypes, AbstractTypeExpectation expectation, LightweightTypeReference type, boolean returnType, ConformanceHint... hints)
acceptType
in class AbstractStackedTypeComputationState
public 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 ITypeComputationState
withExpectation
in class AbstractTypeComputationState
public AbstractTypeComputationState withoutExpectation()
ITypeComputationState
{ someExpression subsequent }The expectation for the call to
someExpression
does not have any actual expectations.withoutExpectation
in interface ITypeComputationState
withoutExpectation
in class AbstractTypeComputationState
public TypeCheckpointComputationState withTypeCheckpoint(org.eclipse.emf.ecore.EObject context)
ITypeComputationState
withTypeCheckpoint
in interface ITypeComputationState
withTypeCheckpoint
in class AbstractTypeComputationState
context
- an indicator that describes the context of this type checkpoint, e.g. an XCasePart
.protected IFeatureLinkingCandidate createResolvedLink(XAbstractFeatureCall featureCall, JvmIdentifiableElement resolvedTo)
createResolvedLink
in class AbstractTypeComputationState
protected boolean isImplicitReceiver(XAbstractFeatureCall featureCall)
protected boolean isImplicitFirstArgument(XAbstractFeatureCall featureCall)
protected boolean isInstanceContext()
protected StackedResolvedTypes getStackedResolvedTypes()