Class ResolvedTypes
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.internal.ResolvedTypes
-
- All Implemented Interfaces:
IResolvedTypes
- Direct Known Subclasses:
RootResolvedTypes,StackedResolvedTypes
public abstract class ResolvedTypes extends java.lang.Object implements IResolvedTypes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classResolvedTypes.Ownerstatic classResolvedTypes.SharedShared state accross all resolved types for a single run of the resolver.protected static classResolvedTypes.SharedKeysAwareMap<K,V>protected static classResolvedTypes.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 protectedResolvedTypes(ResolvedTypes.Shared shared)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidacceptCandidate(XExpression expression, IApplicableCandidate candidate)voidacceptHint(java.lang.Object handle, LightweightBoundTypeArgument boundTypeArgument)protected LightweightTypeReferenceacceptType(XExpression expression, AbstractTypeExpectation expectation, LightweightTypeReference type, boolean returnType, int flags)protected voidacceptType(XExpression expression, TypeData typeData)protected voidacceptUnboundTypeReference(java.lang.Object handle, UnboundTypeReference reference)voidaddDeclaredTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters)protected voidaddDeferredLogic(org.eclipse.xtext.util.IAcceptor<? super IResolvedTypes> code)voidaddDiagnostic(org.eclipse.xtext.diagnostics.AbstractDiagnostic diagnostic)protected voidaddExpressionScope(org.eclipse.emf.ecore.EObject context, IFeatureScopeSession session, IExpressionScope.Anchor anchor)protected voidaddNonRecursiveHints(java.util.List<LightweightBoundTypeArgument> hints, java.util.Set<java.lang.Object> seenHandles, java.util.List<LightweightBoundTypeArgument> result)protected voidaddNonRecursiveHints(LightweightBoundTypeArgument original, java.util.List<LightweightBoundTypeArgument> hints, java.util.Set<java.lang.Object> seenHandles, java.util.List<LightweightBoundTypeArgument> result)protected voidaddNonRecursiveHints(LightweightBoundTypeArgument original, UnboundTypeReference reference, java.util.Set<java.lang.Object> seenHandles, java.util.List<LightweightBoundTypeArgument> result)protected voidappendContent(java.lang.StringBuilder result, java.lang.String indentation)protected voidappendContent(java.util.Collection<?> values, java.lang.String prefix, java.lang.StringBuilder result, java.lang.String indentation)protected voidappendContent(java.util.Map<?,?> map, java.lang.String prefix, java.lang.StringBuilder result, java.lang.String indentation)protected voidappendListMapContent(java.util.Map<?,? extends java.util.Collection<?>> map, java.lang.String prefix, java.lang.StringBuilder result, java.lang.String indentation)protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter>basicGetDeclardTypeParameters()Deprecated, for removal: This API element is subject to removal in a future version.usebasicGetDeclaredTypeParameters()instead.protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter>basicGetDeclaredTypeParameters()protected java.util.Map<XExpression,java.util.List<TypeData>>basicGetExpressionTypes()protected java.util.Map<XExpression,IApplicableCandidate>basicGetLinkingMap()protected java.util.Set<XExpression>basicGetPropagatedTypes()protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference>basicGetReassignedTypes()protected java.util.Set<XExpression>basicGetRefinedTypes()protected java.util.Map<java.lang.Object,java.util.List<LightweightBoundTypeArgument>>basicGetTypeParameterHints()protected java.util.Map<java.lang.Object,UnboundTypeReference>basicGetTypeParameters()protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference>basicGetTypes()protected voidcheckCanceled()protected voidclear()protected voidclearDeferredLogic()protected voidcloseBracket(java.lang.StringBuilder result, java.lang.String indentation)protected LightweightBoundTypeArgumentcopyBoundTypeArgument(LightweightTypeReference typeReference, LightweightBoundTypeArgument boundTypeArgument)protected UnboundTypeReferencecreateUnboundTypeReference(XExpression expression, org.eclipse.xtext.common.types.JvmTypeParameter type)protected ResolvedTypesdiscardExpectedExceptions()protected LightweightTypeReferencedoGetActualType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, boolean ignoreReassignedTypes)protected LightweightTypeReferencedoGetActualType(XExpression expression)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 LightweightTypeReferencedoGetExpectedType(XExpression expression, boolean returnType)protected IFeatureLinkingCandidatedoGetFeature(XAbstractFeatureCall featureCall)protected org.eclipse.xtext.common.types.JvmIdentifiableElementdoGetLinkedFeature(XExpression featureOrConstructorCall)protected LightweightTypeReferencedoGetReturnType(XExpression expression, boolean onlyExplicitReturn)protected java.util.List<TypeData>doGetTypeData(XExpression expression)protected booleandoIsResolved(java.lang.Object handle)java.util.Map<XExpression,AbstractPendingLinkingCandidate<?>>forwardLinking()AbstractPendingLinkingCandidate<?>forwardLinking(XAbstractFeatureCall featureCall)AbstractPendingLinkingCandidate<?>forwardLinking(XConstructorCall constructorCall)LightweightTypeReferencegetActualType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)Returns the actually inferred or declared type for the given identifiable ornullif none.LightweightTypeReferencegetActualType(XExpression expression)Returns the actually inferred type for the given expression ornullif none.java.util.List<LightweightTypeReference>getActualTypeArguments(XExpression expression)Returns the resolved type arguments.java.util.List<LightweightBoundTypeArgument>getAllHints(java.lang.Object handle)java.util.Collection<IAmbiguousLinkingCandidate>getAmbiguousLinkingCandidates()Returns all ambiguous linking candidates that have been encountered.protected intgetConformanceFlags(TypeData typeData, boolean recompute)IConstructorLinkingCandidategetConstructor(XConstructorCall constructorCall)org.eclipse.emf.ecore.resource.ResourceSetgetContextResourceSet()protected org.eclipse.xtext.common.types.JvmTypeReferencegetDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter>getDeclaredTypeParameters()java.util.Collection<org.eclipse.xtext.util.IAcceptor<? super IResolvedTypes>>getDeferredLogic()protected java.util.List<LightweightTypeReference>getExpectedExceptions()LightweightTypeReferencegetExpectedReturnType(XExpression expression)Returns the expected return type for the given expression ornullif none.LightweightTypeReferencegetExpectedType(XExpression expression)Returns the actually expected type for the given expression ornullif none.protected abstract LightweightTypeReferencegetExpectedTypeForAssociatedExpression(org.eclipse.xtext.common.types.JvmMember member, XExpression expression)IExpressionScopegetExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)Returns the scope the given expression is contained in.IFeatureLinkingCandidategetFeature(XAbstractFeatureCall featureCall)protected IFeatureScopeTrackergetFeatureScopeTracker()protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference>getFlattenedReassignedTypes()java.util.Collection<ILinkingCandidate>getFollowUpErrors()Returns the linking candidates that could not be resolved but are not exposed to the users because they are follow up errors.protected java.util.List<LightweightBoundTypeArgument>getHints(java.lang.Object handle)org.eclipse.xtext.common.types.JvmIdentifiableElementgetLinkedFeature(XAbstractFeatureCall featureCall)Returns the intermediate linking result for the given feature call, if any.org.eclipse.xtext.common.types.JvmIdentifiableElementgetLinkedFeature(XConstructorCall constructorCall)Returns the intermediate linking result for the given constructor call, if any.IFeatureLinkingCandidategetLinkingCandidate(XAbstractFeatureCall featureCall)Returns the intermediate linking candidate for the given feature call, if any.IConstructorLinkingCandidategetLinkingCandidate(XConstructorCall constructorCall)Returns the intermediate linking candidate for the given constructor call, if any.protected LightweightTypeReferencegetMergedType(java.util.List<LightweightTypeReference> types)protected org.eclipse.xtext.util.CancelIndicatorgetMonitor()java.util.Collection<org.eclipse.xtext.diagnostics.AbstractDiagnostic>getQueuedDiagnostics()Provides access to all diagnostics that have been added during the type computation so far.ITypeReferenceOwnergetReferenceOwner()protected DefaultReentrantTypeResolvergetResolver()LightweightTypeReferencegetReturnType(XExpression expression)Returns the actually inferred return type for the given expression ornullif none.LightweightTypeReferencegetReturnType(XExpression expression, boolean onlyExplicitReturns)Returns the actually inferred return type for the given expression ornullif none.CommonTypeComputationServicesgetServices()protected org.eclipse.xtext.validation.IssueSeveritiesgetSeverities()java.util.List<LightweightTypeReference>getThrownExceptions(XExpression obj)protected TypeDatagetTypeData(XExpression expression, boolean returnType)protected TypeDatagetTypeData(XExpression expression, boolean returnType, boolean nullIfEmpty)protected UnboundTypeReferencegetUnboundTypeReference(java.lang.Object handle)booleanhasExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)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.booleanisResolved(java.lang.Object handle)booleanisVoidReturnTypeAllowed(XExpression expression)booleanisVoidTypeAllowed(XExpression expression)Returnstrueif the given expression may have the typevoid.protected abstract voidmarkToBeInferred(XExpression expression)protected TypeDatamergeTypeData(XExpression expression, java.util.List<TypeData> allValues, boolean returnType, boolean nullIfEmpty)protected ResolvedTypespushExpectedExceptions(java.util.List<LightweightTypeReference> exceptions)protected ResolvedTypespushExpectedExceptions(org.eclipse.xtext.common.types.JvmExecutable exceptionDeclarator)protected StackedResolvedTypespushReassigningTypes()protected StackedResolvedTypespushTypes()protected ExpressionAwareStackedResolvedTypespushTypes(XExpression context)voidreassignType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)voidreassignTypeWithoutMerge(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)protected voidrefineExpectedType(XExpression receiver, ITypeExpectation refinedExpectation)protected LightweightBoundTypeArgumentremoveRecursiveTypeArguments(java.lang.Object handle, LightweightBoundTypeArgument boundTypeArgument)protected voidreplacePreviousExpressionScope(org.eclipse.emf.ecore.EObject context, IFeatureScopeSession session, IExpressionScope.Anchor anchor)protected voidresolveDependentTypeArguments(java.lang.Object handle, LightweightBoundTypeArgument boundTypeArgument)protected voidsetPropagatedType(XExpression expression)protected voidsetRefinedType(XExpression expression)voidsetType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)protected CompoundTypeReferencetoMultiType(LightweightTypeReference first, LightweightTypeReference second)protected LightweightTypeReferencetoOwnedReference(LightweightTypeReference result)java.lang.StringtoString()protected IResolvedTypeswithFlattenedReassignedTypes()
-
-
-
Constructor Detail
-
ResolvedTypes
protected ResolvedTypes(ResolvedTypes.Shared shared)
-
-
Method Detail
-
getMonitor
protected org.eclipse.xtext.util.CancelIndicator getMonitor()
- Since:
- 2.7
-
checkCanceled
protected void checkCanceled()
-
clear
protected void clear()
-
getSeverities
protected org.eclipse.xtext.validation.IssueSeverities getSeverities()
-
getFeatureScopeTracker
protected IFeatureScopeTracker getFeatureScopeTracker()
-
getReferenceOwner
public ITypeReferenceOwner getReferenceOwner()
-
getContextResourceSet
public org.eclipse.emf.ecore.resource.ResourceSet getContextResourceSet()
-
getServices
public CommonTypeComputationServices getServices()
-
getQueuedDiagnostics
public java.util.Collection<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
-
getDeferredLogic
public java.util.Collection<org.eclipse.xtext.util.IAcceptor<? super IResolvedTypes>> getDeferredLogic()
-
clearDeferredLogic
protected void clearDeferredLogic()
-
addDiagnostic
public void addDiagnostic(org.eclipse.xtext.diagnostics.AbstractDiagnostic diagnostic)
-
addDeferredLogic
protected void addDeferredLogic(org.eclipse.xtext.util.IAcceptor<? super IResolvedTypes> code)
-
getThrownExceptions
public java.util.List<LightweightTypeReference> getThrownExceptions(XExpression obj)
- Specified by:
getThrownExceptionsin interfaceIResolvedTypes
-
forwardLinking
public java.util.Map<XExpression,AbstractPendingLinkingCandidate<?>> forwardLinking()
-
forwardLinking
public AbstractPendingLinkingCandidate<?> forwardLinking(XAbstractFeatureCall featureCall)
-
forwardLinking
public AbstractPendingLinkingCandidate<?> forwardLinking(XConstructorCall constructorCall)
-
getLinkedFeature
public org.eclipse.xtext.common.types.JvmIdentifiableElement getLinkedFeature(XAbstractFeatureCall featureCall)
Description copied from interface:IResolvedTypesReturns the intermediate linking result for the given feature call, if any. If the feature call isnull, the result isnull.- Specified by:
getLinkedFeaturein interfaceIResolvedTypes- Parameters:
featureCall- the feature call that is queried for the current linking state.- Returns:
- the potentially intermediate linking state or
nullif none.
-
getLinkedFeature
public org.eclipse.xtext.common.types.JvmIdentifiableElement getLinkedFeature(XConstructorCall constructorCall)
Description copied from interface:IResolvedTypesReturns the intermediate linking result for the given constructor call, if any. If the constructor call isnull, the result isnull. If the constructor call is broken, it may return aJvmTypeinstead of aJvmConstructor.- Specified by:
getLinkedFeaturein interfaceIResolvedTypes- Parameters:
constructorCall- the constructor call that is queried for the current linking state.- Returns:
- the potentially intermediate linking state or
nullif none.
-
getLinkingCandidate
public IFeatureLinkingCandidate getLinkingCandidate(XAbstractFeatureCall featureCall)
Description copied from interface:IResolvedTypesReturns the intermediate linking candidate for the given feature call, if any. If the feature call isnull, the result isnull.- Specified by:
getLinkingCandidatein interfaceIResolvedTypes- Parameters:
featureCall- the feature call that is queried for the current linking state.- Returns:
- the potentially intermediate linking state or
nullif none.
-
getLinkingCandidate
public IConstructorLinkingCandidate getLinkingCandidate(XConstructorCall constructorCall)
Description copied from interface:IResolvedTypesReturns the intermediate linking candidate for the given constructor call, if any. If the constructor call isnull, the result isnull. If the constructor call is broken, it may return aJvmTypeinstead of aJvmConstructor.- Specified by:
getLinkingCandidatein interfaceIResolvedTypes- Parameters:
constructorCall- the constructor call that is queried for the current linking state.- Returns:
- the potentially intermediate linking state or
nullif none.
-
doGetCandidate
protected IApplicableCandidate doGetCandidate(XExpression featureOrConstructorCall)
-
doGetLinkedFeature
protected org.eclipse.xtext.common.types.JvmIdentifiableElement doGetLinkedFeature(XExpression featureOrConstructorCall)
-
getTypeData
protected TypeData getTypeData(XExpression expression, boolean returnType)
-
getTypeData
protected TypeData getTypeData(XExpression expression, boolean returnType, boolean nullIfEmpty)
-
doGetTypeData
protected java.util.List<TypeData> doGetTypeData(XExpression expression)
-
mergeTypeData
protected TypeData mergeTypeData(XExpression expression, java.util.List<TypeData> allValues, boolean returnType, boolean nullIfEmpty)
-
getMergedType
protected LightweightTypeReference getMergedType(java.util.List<LightweightTypeReference> types)
-
getActualType
public LightweightTypeReference getActualType(XExpression expression)
Description copied from interface:IResolvedTypesReturns the actually inferred type for the given expression ornullif none.- Specified by:
getActualTypein interfaceIResolvedTypes- Parameters:
expression- expression whose type is queried.
-
getExpectedTypeForAssociatedExpression
protected abstract LightweightTypeReference getExpectedTypeForAssociatedExpression(org.eclipse.xtext.common.types.JvmMember member, XExpression expression)
-
getReturnType
public LightweightTypeReference getReturnType(XExpression expression)
Description copied from interface:IResolvedTypesReturns the actually inferred return type for the given expression ornullif none. Returns the actual expression type, if no explicit return type exists. Shorthand forgetReturnType(expression, false)- Specified by:
getReturnTypein interfaceIResolvedTypes- Parameters:
expression- expression whose return type is queried.
-
getReturnType
public LightweightTypeReference getReturnType(XExpression expression, boolean onlyExplicitReturns)
Description copied from interface:IResolvedTypesReturns the actually inferred return type for the given expression ornullif none.- Specified by:
getReturnTypein interfaceIResolvedTypes- Parameters:
expression- expression whose return type is queried.
-
toOwnedReference
protected LightweightTypeReference toOwnedReference(LightweightTypeReference result)
-
doGetActualType
protected LightweightTypeReference doGetActualType(XExpression expression)
-
doGetReturnType
protected LightweightTypeReference doGetReturnType(XExpression expression, boolean onlyExplicitReturn)
-
getExpectedType
public LightweightTypeReference getExpectedType(XExpression expression)
Description copied from interface:IResolvedTypesReturns the actually expected type for the given expression ornullif none.- Specified by:
getExpectedTypein interfaceIResolvedTypes- Parameters:
expression- expression whose expected type is queried.
-
pushExpectedExceptions
protected ResolvedTypes pushExpectedExceptions(java.util.List<LightweightTypeReference> exceptions)
-
discardExpectedExceptions
protected ResolvedTypes discardExpectedExceptions()
-
pushExpectedExceptions
protected ResolvedTypes pushExpectedExceptions(org.eclipse.xtext.common.types.JvmExecutable exceptionDeclarator)
-
getExpectedReturnType
public LightweightTypeReference getExpectedReturnType(XExpression expression)
Description copied from interface:IResolvedTypesReturns the expected return type for the given expression ornullif none.- Specified by:
getExpectedReturnTypein interfaceIResolvedTypes- Parameters:
expression- expression whose expected return type is queried.
-
isVoidTypeAllowed
public boolean isVoidTypeAllowed(XExpression expression)
Description copied from interface:IResolvedTypesReturnstrueif the given expression may have the typevoid.- Specified by:
isVoidTypeAllowedin interfaceIResolvedTypes- Parameters:
expression- expression whose expected type is queried.
-
isVoidReturnTypeAllowed
public boolean isVoidReturnTypeAllowed(XExpression expression)
-
doGetExpectedType
protected LightweightTypeReference doGetExpectedType(XExpression expression, boolean returnType)
-
getActualTypeArguments
public final java.util.List<LightweightTypeReference> getActualTypeArguments(XExpression expression)
Description copied from interface:IResolvedTypesReturns the resolved type arguments. If the expression refers to a constructor and the constructor itself defines type parameters, their resolved representation is prepended to the list of type arguments. Consider the following type:class C<T, V> { public <PLgt; C(P p) {} }An invocation of the constructorCwill return three type arguments, the bound values of forP,TandV.- Specified by:
getActualTypeArgumentsin interfaceIResolvedTypes- Parameters:
expression- may either be anXAbstractFeatureCallorXConstructorCall. May not benull.
-
doGetActualTypeArguments
protected java.util.List<LightweightTypeReference> doGetActualTypeArguments(XExpression expression)
-
setType
public void setType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)
-
reassignType
public void reassignType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)
-
toMultiType
protected CompoundTypeReference toMultiType(LightweightTypeReference first, LightweightTypeReference second)
-
isRefinedType
protected boolean isRefinedType(org.eclipse.xtext.common.types.JvmIdentifiableElement element)
-
reassignTypeWithoutMerge
public void reassignTypeWithoutMerge(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, LightweightTypeReference reference)
-
acceptType
protected LightweightTypeReference acceptType(XExpression expression, AbstractTypeExpectation expectation, LightweightTypeReference type, boolean returnType, int flags)
-
getConformanceFlags
protected int getConformanceFlags(TypeData typeData, boolean recompute)
-
acceptType
protected void acceptType(XExpression expression, TypeData typeData)
-
basicGetTypes
protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference> basicGetTypes()
-
basicGetReassignedTypes
protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference> basicGetReassignedTypes()
-
basicGetExpressionTypes
protected java.util.Map<XExpression,java.util.List<TypeData>> basicGetExpressionTypes()
-
refineExpectedType
protected void refineExpectedType(XExpression receiver, ITypeExpectation refinedExpectation)
-
basicGetTypeParameterHints
protected java.util.Map<java.lang.Object,java.util.List<LightweightBoundTypeArgument>> basicGetTypeParameterHints()
-
basicGetLinkingMap
protected java.util.Map<XExpression,IApplicableCandidate> basicGetLinkingMap()
-
getFollowUpErrors
public java.util.Collection<ILinkingCandidate> getFollowUpErrors()
Description copied from interface:IResolvedTypesReturns the linking candidates that could not be resolved but are not exposed to the users because they are follow up errors.- Specified by:
getFollowUpErrorsin interfaceIResolvedTypes
-
getAmbiguousLinkingCandidates
public java.util.Collection<IAmbiguousLinkingCandidate> getAmbiguousLinkingCandidates()
Description copied from interface:IResolvedTypesReturns all ambiguous linking candidates that have been encountered.- Specified by:
getAmbiguousLinkingCandidatesin interfaceIResolvedTypes
-
getActualType
public LightweightTypeReference getActualType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)
Description copied from interface:IResolvedTypesReturns the actually inferred or declared type for the given identifiable ornullif none.- Specified by:
getActualTypein interfaceIResolvedTypes- Parameters:
identifiable- identifiable whose type is queried.
-
doGetActualType
protected final LightweightTypeReference doGetActualType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, boolean ignoreReassignedTypes)
-
doGetActualTypeNoDeclaration
protected LightweightTypeReference doGetActualTypeNoDeclaration(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable, boolean ignoreReassignedTypes)
-
doGetDeclaredType
protected LightweightTypeReference doGetDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)
-
getDeclaredType
protected org.eclipse.xtext.common.types.JvmTypeReference getDeclaredType(org.eclipse.xtext.common.types.JvmIdentifiableElement identifiable)
-
getFeature
public final IFeatureLinkingCandidate getFeature(XAbstractFeatureCall featureCall)
-
doGetFeature
protected IFeatureLinkingCandidate doGetFeature(XAbstractFeatureCall featureCall)
-
getConstructor
public final IConstructorLinkingCandidate getConstructor(XConstructorCall constructorCall)
-
doGetConstructor
protected IConstructorLinkingCandidate doGetConstructor(XConstructorCall constructorCall)
-
acceptCandidate
protected void acceptCandidate(XExpression expression, IApplicableCandidate candidate)
-
getResolver
protected DefaultReentrantTypeResolver getResolver()
-
getUnboundTypeReference
protected UnboundTypeReference getUnboundTypeReference(java.lang.Object handle)
-
createUnboundTypeReference
protected UnboundTypeReference createUnboundTypeReference(XExpression expression, org.eclipse.xtext.common.types.JvmTypeParameter type)
-
acceptUnboundTypeReference
protected void acceptUnboundTypeReference(java.lang.Object handle, UnboundTypeReference reference)
-
basicGetTypeParameters
protected java.util.Map<java.lang.Object,UnboundTypeReference> basicGetTypeParameters()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
closeBracket
protected void closeBracket(java.lang.StringBuilder result, java.lang.String indentation)
-
appendContent
protected void appendContent(java.lang.StringBuilder result, java.lang.String indentation)
-
appendContent
protected void appendContent(java.util.Map<?,?> map, java.lang.String prefix, java.lang.StringBuilder result, java.lang.String indentation)
-
appendContent
protected void appendContent(java.util.Collection<?> values, java.lang.String prefix, java.lang.StringBuilder result, java.lang.String indentation)
-
appendListMapContent
protected void appendListMapContent(java.util.Map<?,? extends java.util.Collection<?>> map, java.lang.String prefix, java.lang.StringBuilder result, java.lang.String indentation)
-
acceptHint
public void acceptHint(java.lang.Object handle, LightweightBoundTypeArgument boundTypeArgument)
-
copyBoundTypeArgument
protected LightweightBoundTypeArgument copyBoundTypeArgument(LightweightTypeReference typeReference, LightweightBoundTypeArgument boundTypeArgument)
-
removeRecursiveTypeArguments
protected LightweightBoundTypeArgument removeRecursiveTypeArguments(java.lang.Object handle, LightweightBoundTypeArgument boundTypeArgument)
-
resolveDependentTypeArguments
protected void resolveDependentTypeArguments(java.lang.Object handle, LightweightBoundTypeArgument boundTypeArgument)
-
isResolved
public final boolean isResolved(java.lang.Object handle)
-
doIsResolved
protected boolean doIsResolved(java.lang.Object handle)
-
isPropagatedType
protected boolean isPropagatedType(XExpression expression)
-
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- Parameters:
expression- the expression that may have been typed based on a refinement.- Returns:
trueif the type was refined,falseotherwise.
-
setPropagatedType
protected void setPropagatedType(XExpression expression)
-
setRefinedType
protected void setRefinedType(XExpression expression)
-
basicGetPropagatedTypes
protected java.util.Set<XExpression> basicGetPropagatedTypes()
-
basicGetRefinedTypes
protected java.util.Set<XExpression> basicGetRefinedTypes()
-
basicGetDeclaredTypeParameters
protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> basicGetDeclaredTypeParameters()
-
basicGetDeclardTypeParameters
@Deprecated(forRemoval=true) protected java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> basicGetDeclardTypeParameters()
Deprecated, for removal: This API element is subject to removal in a future version.usebasicGetDeclaredTypeParameters()instead.
-
getDeclaredTypeParameters
public java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> getDeclaredTypeParameters()
-
addDeclaredTypeParameters
public void addDeclaredTypeParameters(java.util.List<org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters)
-
getExpectedExceptions
protected java.util.List<LightweightTypeReference> getExpectedExceptions()
-
getAllHints
public java.util.List<LightweightBoundTypeArgument> getAllHints(java.lang.Object handle)
-
getHints
protected java.util.List<LightweightBoundTypeArgument> getHints(java.lang.Object handle)
-
addNonRecursiveHints
protected void addNonRecursiveHints(java.util.List<LightweightBoundTypeArgument> hints, java.util.Set<java.lang.Object> seenHandles, java.util.List<LightweightBoundTypeArgument> result)
-
addNonRecursiveHints
protected void addNonRecursiveHints(LightweightBoundTypeArgument original, java.util.List<LightweightBoundTypeArgument> hints, java.util.Set<java.lang.Object> seenHandles, java.util.List<LightweightBoundTypeArgument> result)
-
addNonRecursiveHints
protected void addNonRecursiveHints(LightweightBoundTypeArgument original, UnboundTypeReference reference, java.util.Set<java.lang.Object> seenHandles, java.util.List<LightweightBoundTypeArgument> result)
-
pushTypes
protected StackedResolvedTypes pushTypes()
-
pushTypes
protected ExpressionAwareStackedResolvedTypes pushTypes(XExpression context)
-
pushReassigningTypes
protected StackedResolvedTypes pushReassigningTypes()
-
markToBeInferred
protected abstract void markToBeInferred(XExpression expression)
-
addExpressionScope
protected void addExpressionScope(org.eclipse.emf.ecore.EObject context, IFeatureScopeSession session, IExpressionScope.Anchor anchor)
-
replacePreviousExpressionScope
protected void replacePreviousExpressionScope(org.eclipse.emf.ecore.EObject context, IFeatureScopeSession session, IExpressionScope.Anchor anchor)
-
getExpressionScope
public IExpressionScope getExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)
Description copied from interface:IResolvedTypesReturns the scope the given expression is contained in. This considers all decision paths that were taken while computing the type of the expression. The returned scope carries some meta data such as whether there was an attempt to resolve the given expression as a type.- Specified by:
getExpressionScopein interfaceIResolvedTypes
-
hasExpressionScope
public boolean hasExpressionScope(org.eclipse.emf.ecore.EObject context, IExpressionScope.Anchor anchor)- Specified by:
hasExpressionScopein interfaceIResolvedTypes
-
withFlattenedReassignedTypes
protected IResolvedTypes withFlattenedReassignedTypes()
-
getFlattenedReassignedTypes
protected java.util.Map<org.eclipse.xtext.common.types.JvmIdentifiableElement,LightweightTypeReference> getFlattenedReassignedTypes()
-
-