Class StackedResolvedTypes
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.ResolvedTypes
-
- org.eclipse.xtext.xbase.typesystem.internal.StackedResolvedTypes
-
- All Implemented Interfaces:
IResolvedTypes
- Direct Known Subclasses:
CapturedLocalElementsAwareStackedResolvedTypes,ExpectedExceptionsStackedResolvedTypes,ExpressionAwareStackedResolvedTypes,ReassigningStackedResolvedTypes
public class StackedResolvedTypes extends ResolvedTypes
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.xbase.typesystem.internal.ResolvedTypes
ResolvedTypes.Owner, ResolvedTypes.Shared, ResolvedTypes.SharedKeysAwareMap<K,V>, ResolvedTypes.SharedKeysAwareSet<E>
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.xbase.typesystem.IResolvedTypes
IResolvedTypes.NullResolvedTypes
-
-
Field Summary
-
Fields inherited from interface org.eclipse.xtext.xbase.typesystem.IResolvedTypes
NULL
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStackedResolvedTypes(ResolvedTypes parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDeclaredTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters)protected voidappendContent(java.lang.StringBuilder result, java.lang.String indentation)protected voidclear()protected java.util.List<LightweightTypeReference>doGetActualTypeArguments(XExpression expression)protected LightweightTypeReferencedoGetActualTypeNoDeclaration(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, boolean ignoreReassignedTypes)protected IApplicableCandidatedoGetCandidate(XExpression featureOrConstructorCall)protected IConstructorLinkingCandidatedoGetConstructor(XConstructorCall constructorCall)protected LightweightTypeReferencedoGetDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)protected IFeatureLinkingCandidatedoGetFeature(XAbstractFeatureCall featureCall)protected org.eclipse.xtext.common.types.JvmIdentifiableElementdoGetLinkedFeature(XExpression featureOrConstructorCall)protected java.util.List<TypeData>doGetTypeData(XExpression expression)protected booleandoIsResolved(java.lang.Object handle)protected intgetConformanceFlags(XExpression expression, boolean recompute)java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter>getDeclaredTypeParameters()java.util.Collection<org.eclipse.xtext.util.IAcceptor<? super IResolvedTypes>>getDeferredLogic()java.util.List<LightweightTypeReference>getExpectedExceptions()protected LightweightTypeReferencegetExpectedTypeForAssociatedExpression(org.eclipse.xtext.common.types.JvmMember member, XExpression expression)protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference>getFlattenedReassignedTypes()protected java.util.List<LightweightBoundTypeArgument>getHints(java.lang.Object handle)protected ResolvedTypesgetParent()java.util.List<org.eclipse.xtext.diagnostics.AbstractDiagnostic>getQueuedDiagnostics()Provides access to all diagnostics that have been added during the type computation so far.protected UnboundTypeReferencegetUnboundTypeReference(java.lang.Object handle)protected booleanisPropagatedType(XExpression expression)protected booleanisRefinedType(org.eclipse.xtext.common.types.JvmIdentifiableElement element)booleanisRefinedType(XExpression expression)Returnstrueif the expression's type is based on a type refinement, e.g.protected voidmarkToBeInferred(XExpression expression)protected voidmergeDeferredRunnables(ResolvedTypes parent)protected voidmergeExpressionTypesIntoParent(ResolvedTypes parent)protected voidmergeInto(ResolvedTypes parent)protected voidmergeIntoParent()protected voidmergeLinkingCandidatesIntoParent(ResolvedTypes parent)protected voidmergePropagatedTypes(ResolvedTypes parent)protected voidmergeQueuedDiagnostics(ResolvedTypes parent)protected voidmergeRefinedTypes(ResolvedTypes parent)protected voidmergeTypeParametersIntoParent(ResolvedTypes parent)protected voidmergeTypesIntoParent(ResolvedTypes parent)protected voidperformMergeIntoParent()protected TypeDataprepareMerge(TypeData typeData, ITypeReferenceOwner owner)protected voidprepareMergeIntoParent()voidreassignType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)protected voidrefineExpectedType(XExpression receiver, ITypeExpectation refinedExpectation)voidreplaceDeclaredTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters)-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.internal.ResolvedTypes
acceptCandidate, acceptHint, acceptType, acceptType, acceptUnboundTypeReference, addDeferredLogic, addDiagnostic, addExpressionScope, addNonRecursiveHints, addNonRecursiveHints, addNonRecursiveHints, appendContent, appendContent, appendListMapContent, basicGetDeclardTypeParameters, basicGetDeclaredTypeParameters, basicGetExpressionTypes, basicGetLinkingMap, basicGetPropagatedTypes, basicGetReassignedTypes, basicGetRefinedTypes, basicGetTypeParameterHints, basicGetTypeParameters, basicGetTypes, checkCanceled, clearDeferredLogic, closeBracket, copyBoundTypeArgument, createUnboundTypeReference, discardExpectedExceptions, doGetActualType, doGetActualType, doGetExpectedType, doGetReturnType, forwardLinking, forwardLinking, forwardLinking, getActualType, getActualType, getActualTypeArguments, getAllHints, getAmbiguousLinkingCandidates, getConformanceFlags, getConstructor, getContextResourceSet, getDeclaredType, getExpectedReturnType, getExpectedType, getExpressionScope, getFeature, getFeatureScopeTracker, getFollowUpErrors, getLinkedFeature, getLinkedFeature, getLinkingCandidate, getLinkingCandidate, getMergedType, getMonitor, getReferenceOwner, getResolver, getReturnType, getReturnType, getServices, getSeverities, getThrownExceptions, getTypeData, getTypeData, hasExpressionScope, isResolved, isVoidReturnTypeAllowed, isVoidTypeAllowed, mergeTypeData, pushExpectedExceptions, pushExpectedExceptions, pushReassigningTypes, pushTypes, pushTypes, reassignTypeWithoutMerge, removeRecursiveTypeArguments, replacePreviousExpressionScope, resolveDependentTypeArguments, setPropagatedType, setRefinedType, setType, toMultiType, toOwnedReference, toString, withFlattenedReassignedTypes
-
-
-
-
Constructor Detail
-
StackedResolvedTypes
protected StackedResolvedTypes(ResolvedTypes parent)
-
-
Method Detail
-
clear
protected void clear()
- Overrides:
clearin classResolvedTypes
-
getParent
protected ResolvedTypes getParent()
-
mergeIntoParent
protected void mergeIntoParent()
-
prepareMergeIntoParent
protected void prepareMergeIntoParent()
-
performMergeIntoParent
protected void performMergeIntoParent()
-
mergeInto
protected void mergeInto(ResolvedTypes parent)
-
mergePropagatedTypes
protected void mergePropagatedTypes(ResolvedTypes parent)
-
mergeRefinedTypes
protected void mergeRefinedTypes(ResolvedTypes parent)
-
isPropagatedType
protected boolean isPropagatedType(XExpression expression)
- Overrides:
isPropagatedTypein classResolvedTypes
-
isRefinedType
public boolean isRefinedType(XExpression expression)
Description copied from interface:IResolvedTypesReturnstrueif the expression's type is based on a type refinement, e.g. an instanceof guard my specialize the type of the checked reference. Any feature call to that reference is considered to be based on a refined type.- Specified by:
isRefinedTypein interfaceIResolvedTypes- Overrides:
isRefinedTypein classResolvedTypes- Parameters:
expression- the expression that may have been typed based on a refinement.- Returns:
trueif the type was refined,falseotherwise.
-
mergeQueuedDiagnostics
protected void mergeQueuedDiagnostics(ResolvedTypes parent)
-
mergeDeferredRunnables
protected void mergeDeferredRunnables(ResolvedTypes parent)
-
mergeExpressionTypesIntoParent
protected void mergeExpressionTypesIntoParent(ResolvedTypes parent)
-
prepareMerge
protected TypeData prepareMerge(TypeData typeData, ITypeReferenceOwner owner)
-
mergeLinkingCandidatesIntoParent
protected void mergeLinkingCandidatesIntoParent(ResolvedTypes parent)
-
mergeTypesIntoParent
protected void mergeTypesIntoParent(ResolvedTypes parent)
-
mergeTypeParametersIntoParent
protected void mergeTypeParametersIntoParent(ResolvedTypes parent)
-
doIsResolved
protected boolean doIsResolved(java.lang.Object handle)
- Overrides:
doIsResolvedin classResolvedTypes
-
doGetTypeData
protected java.util.List<TypeData> doGetTypeData(XExpression expression)
- Overrides:
doGetTypeDatain classResolvedTypes
-
doGetActualTypeNoDeclaration
protected LightweightTypeReference doGetActualTypeNoDeclaration(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, boolean ignoreReassignedTypes)
- Overrides:
doGetActualTypeNoDeclarationin classResolvedTypes
-
isRefinedType
protected boolean isRefinedType(org.eclipse.xtext.common.types.JvmIdentifiableElement element)
- Overrides:
isRefinedTypein classResolvedTypes
-
doGetCandidate
protected IApplicableCandidate doGetCandidate(XExpression featureOrConstructorCall)
- Overrides:
doGetCandidatein classResolvedTypes
-
doGetLinkedFeature
protected org.eclipse.xtext.common.types.JvmIdentifiableElement doGetLinkedFeature(XExpression featureOrConstructorCall)
- Overrides:
doGetLinkedFeaturein classResolvedTypes
-
getExpectedExceptions
public java.util.List<LightweightTypeReference> getExpectedExceptions()
- Overrides:
getExpectedExceptionsin classResolvedTypes
-
doGetDeclaredType
protected LightweightTypeReference doGetDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)
- Overrides:
doGetDeclaredTypein classResolvedTypes
-
getDeclaredTypeParameters
public java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> getDeclaredTypeParameters()
- Overrides:
getDeclaredTypeParametersin classResolvedTypes
-
addDeclaredTypeParameters
public void addDeclaredTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters)
- Overrides:
addDeclaredTypeParametersin classResolvedTypes
-
replaceDeclaredTypeParameters
public void replaceDeclaredTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters)
-
doGetActualTypeArguments
protected java.util.List<LightweightTypeReference> doGetActualTypeArguments(XExpression expression)
- Overrides:
doGetActualTypeArgumentsin classResolvedTypes
-
doGetFeature
protected IFeatureLinkingCandidate doGetFeature(XAbstractFeatureCall featureCall)
- Overrides:
doGetFeaturein classResolvedTypes
-
doGetConstructor
protected IConstructorLinkingCandidate doGetConstructor(XConstructorCall constructorCall)
- Overrides:
doGetConstructorin classResolvedTypes
-
reassignType
public void reassignType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)- Overrides:
reassignTypein classResolvedTypes
-
getQueuedDiagnostics
public java.util.List<org.eclipse.xtext.diagnostics.AbstractDiagnostic> getQueuedDiagnostics()
Description copied from interface:IResolvedTypesProvides access to all diagnostics that have been added during the type computation so far.- Specified by:
getQueuedDiagnosticsin interfaceIResolvedTypes- Overrides:
getQueuedDiagnosticsin classResolvedTypes
-
getDeferredLogic
public java.util.Collection<org.eclipse.xtext.util.IAcceptor<? super IResolvedTypes>> getDeferredLogic()
- Overrides:
getDeferredLogicin classResolvedTypes
-
getUnboundTypeReference
protected UnboundTypeReference getUnboundTypeReference(java.lang.Object handle)
- Overrides:
getUnboundTypeReferencein classResolvedTypes
-
refineExpectedType
protected void refineExpectedType(XExpression receiver, ITypeExpectation refinedExpectation)
- Overrides:
refineExpectedTypein classResolvedTypes
-
getHints
protected java.util.List<LightweightBoundTypeArgument> getHints(java.lang.Object handle)
- Overrides:
getHintsin classResolvedTypes
-
getConformanceFlags
protected int getConformanceFlags(XExpression expression, boolean recompute)
-
appendContent
protected void appendContent(java.lang.StringBuilder result, java.lang.String indentation)- Overrides:
appendContentin classResolvedTypes
-
getExpectedTypeForAssociatedExpression
protected LightweightTypeReference getExpectedTypeForAssociatedExpression(org.eclipse.xtext.common.types.JvmMember member, XExpression expression)
- Specified by:
getExpectedTypeForAssociatedExpressionin classResolvedTypes
-
markToBeInferred
protected void markToBeInferred(XExpression expression)
- Specified by:
markToBeInferredin classResolvedTypes
-
getFlattenedReassignedTypes
protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference> getFlattenedReassignedTypes()
- Overrides:
getFlattenedReassignedTypesin classResolvedTypes
-
-