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 protected
StackedResolvedTypes(ResolvedTypes parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDeclaredTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters)
protected void
appendContent(java.lang.StringBuilder result, java.lang.String indentation)
protected void
clear()
protected java.util.List<LightweightTypeReference>
doGetActualTypeArguments(XExpression expression)
protected LightweightTypeReference
doGetActualTypeNoDeclaration(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, boolean ignoreReassignedTypes)
protected IApplicableCandidate
doGetCandidate(XExpression featureOrConstructorCall)
protected IConstructorLinkingCandidate
doGetConstructor(XConstructorCall constructorCall)
protected LightweightTypeReference
doGetDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)
protected IFeatureLinkingCandidate
doGetFeature(XAbstractFeatureCall featureCall)
protected org.eclipse.xtext.common.types.JvmIdentifiableElement
doGetLinkedFeature(XExpression featureOrConstructorCall)
protected java.util.List<TypeData>
doGetTypeData(XExpression expression)
protected boolean
doIsResolved(java.lang.Object handle)
protected int
getConformanceFlags(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 LightweightTypeReference
getExpectedTypeForAssociatedExpression(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 ResolvedTypes
getParent()
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 UnboundTypeReference
getUnboundTypeReference(java.lang.Object handle)
protected boolean
isPropagatedType(XExpression expression)
protected boolean
isRefinedType(org.eclipse.xtext.common.types.JvmIdentifiableElement element)
boolean
isRefinedType(XExpression expression)
Returnstrue
if the expression's type is based on a type refinement, e.g.protected void
markToBeInferred(XExpression expression)
protected void
mergeDeferredRunnables(ResolvedTypes parent)
protected void
mergeExpressionTypesIntoParent(ResolvedTypes parent)
protected void
mergeInto(ResolvedTypes parent)
protected void
mergeIntoParent()
protected void
mergeLinkingCandidatesIntoParent(ResolvedTypes parent)
protected void
mergePropagatedTypes(ResolvedTypes parent)
protected void
mergeQueuedDiagnostics(ResolvedTypes parent)
protected void
mergeRefinedTypes(ResolvedTypes parent)
protected void
mergeTypeParametersIntoParent(ResolvedTypes parent)
protected void
mergeTypesIntoParent(ResolvedTypes parent)
protected void
performMergeIntoParent()
protected TypeData
prepareMerge(TypeData typeData, ITypeReferenceOwner owner)
protected void
prepareMergeIntoParent()
void
reassignType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)
protected void
refineExpectedType(XExpression receiver, ITypeExpectation refinedExpectation)
void
replaceDeclaredTypeParameters(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, basicGetExpressionTypes, basicGetLinkingMap, basicGetPropagatedTypes, basicGetReassignedTypes, basicGetRefinedTypes, basicGetTypeParameterHints, basicGetTypeParameters, basicGetTypes, checkCanceled, clearDeferredLogic, closeBracket, copyBoundTypeArgument, createUnboundTypeReference, discardExpectedExceptions, doGetActualType, doGetActualType, doGetExpectedType, doGetReturnType, 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:
clear
in 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:
isPropagatedType
in classResolvedTypes
-
isRefinedType
public boolean isRefinedType(XExpression expression)
Description copied from interface:IResolvedTypes
Returnstrue
if 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:
isRefinedType
in interfaceIResolvedTypes
- Overrides:
isRefinedType
in classResolvedTypes
- Parameters:
expression
- the expression that may have been typed based on a refinement.- Returns:
true
if the type was refined,false
otherwise.
-
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:
doIsResolved
in classResolvedTypes
-
doGetTypeData
protected java.util.List<TypeData> doGetTypeData(XExpression expression)
- Overrides:
doGetTypeData
in classResolvedTypes
-
doGetActualTypeNoDeclaration
protected LightweightTypeReference doGetActualTypeNoDeclaration(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, boolean ignoreReassignedTypes)
- Overrides:
doGetActualTypeNoDeclaration
in classResolvedTypes
-
isRefinedType
protected boolean isRefinedType(org.eclipse.xtext.common.types.JvmIdentifiableElement element)
- Overrides:
isRefinedType
in classResolvedTypes
-
doGetCandidate
protected IApplicableCandidate doGetCandidate(XExpression featureOrConstructorCall)
- Overrides:
doGetCandidate
in classResolvedTypes
-
doGetLinkedFeature
protected org.eclipse.xtext.common.types.JvmIdentifiableElement doGetLinkedFeature(XExpression featureOrConstructorCall)
- Overrides:
doGetLinkedFeature
in classResolvedTypes
-
getExpectedExceptions
public java.util.List<LightweightTypeReference> getExpectedExceptions()
- Overrides:
getExpectedExceptions
in classResolvedTypes
-
doGetDeclaredType
protected LightweightTypeReference doGetDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)
- Overrides:
doGetDeclaredType
in classResolvedTypes
-
getDeclaredTypeParameters
public java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> getDeclaredTypeParameters()
- Overrides:
getDeclaredTypeParameters
in classResolvedTypes
-
addDeclaredTypeParameters
public void addDeclaredTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters)
- Overrides:
addDeclaredTypeParameters
in 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:
doGetActualTypeArguments
in classResolvedTypes
-
doGetFeature
protected IFeatureLinkingCandidate doGetFeature(XAbstractFeatureCall featureCall)
- Overrides:
doGetFeature
in classResolvedTypes
-
doGetConstructor
protected IConstructorLinkingCandidate doGetConstructor(XConstructorCall constructorCall)
- Overrides:
doGetConstructor
in classResolvedTypes
-
reassignType
public void reassignType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)
- Overrides:
reassignType
in classResolvedTypes
-
getQueuedDiagnostics
public java.util.List<org.eclipse.xtext.diagnostics.AbstractDiagnostic> getQueuedDiagnostics()
Description copied from interface:IResolvedTypes
Provides access to all diagnostics that have been added during the type computation so far.- Specified by:
getQueuedDiagnostics
in interfaceIResolvedTypes
- Overrides:
getQueuedDiagnostics
in classResolvedTypes
-
getDeferredLogic
public java.util.Collection<org.eclipse.xtext.util.IAcceptor<? super IResolvedTypes>> getDeferredLogic()
- Overrides:
getDeferredLogic
in classResolvedTypes
-
getUnboundTypeReference
protected UnboundTypeReference getUnboundTypeReference(java.lang.Object handle)
- Overrides:
getUnboundTypeReference
in classResolvedTypes
-
refineExpectedType
protected void refineExpectedType(XExpression receiver, ITypeExpectation refinedExpectation)
- Overrides:
refineExpectedType
in classResolvedTypes
-
getHints
protected java.util.List<LightweightBoundTypeArgument> getHints(java.lang.Object handle)
- Overrides:
getHints
in classResolvedTypes
-
getConformanceFlags
protected int getConformanceFlags(XExpression expression, boolean recompute)
-
appendContent
protected void appendContent(java.lang.StringBuilder result, java.lang.String indentation)
- Overrides:
appendContent
in classResolvedTypes
-
getExpectedTypeForAssociatedExpression
protected LightweightTypeReference getExpectedTypeForAssociatedExpression(org.eclipse.xtext.common.types.JvmMember member, XExpression expression)
- Specified by:
getExpectedTypeForAssociatedExpression
in classResolvedTypes
-
markToBeInferred
protected void markToBeInferred(XExpression expression)
- Specified by:
markToBeInferred
in classResolvedTypes
-
getFlattenedReassignedTypes
protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference> getFlattenedReassignedTypes()
- Overrides:
getFlattenedReassignedTypes
in classResolvedTypes
-
-